Compare commits
100 Commits
v1.0.2-1
...
6f9de86b71
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f9de86b71 | ||
|
|
fa5db368cd | ||
|
|
47d7f8c446 | ||
|
|
cb00d24179 | ||
|
|
5ad2d75aa4 | ||
|
|
1e0b797e9e | ||
|
|
b23b75115b | ||
|
|
7a145d3912 | ||
|
|
f07bcafc07 | ||
|
|
d18c98311a | ||
|
|
7a1a8da39c | ||
|
|
d2c858ce40 | ||
|
|
4c6f0a5bb4 | ||
|
|
34b7b68f67 | ||
|
|
cdafede708 | ||
|
|
1db89f9c01 | ||
|
|
2991286fd7 | ||
|
|
f47135f20c | ||
|
|
c6c0244b27 | ||
|
|
83a6387db8 | ||
|
|
6b1bad9cbe | ||
|
|
d334b9e473 | ||
|
|
cf6cdc72ea | ||
|
|
043dfacd77 | ||
|
|
fc61534370 | ||
|
|
054e18179d | ||
|
|
907dfadf75 | ||
|
|
cdd700bf4e | ||
|
|
872baa1dc2 | ||
|
|
9f110481ad | ||
|
|
12ceba0bf6 | ||
|
|
e1549afa07 | ||
|
|
89fac665f3 | ||
|
|
0177b52b7f | ||
|
|
25e7daf7e4 | ||
|
|
dcf2c8a967 | ||
|
|
297bd279e4 | ||
|
|
c8aebf5a9e | ||
|
|
68ef85b06d | ||
|
|
4c160177fb | ||
|
|
18dccbf140 | ||
|
|
07b4d20790 | ||
|
|
8d952d9aee | ||
|
|
3a0933a2c4 | ||
|
|
aed46398a3 | ||
|
|
798b052e1a | ||
|
|
8b171ed9e9 | ||
|
|
b45eefc031 | ||
|
|
364a25192a | ||
|
|
fc56cf7a56 | ||
|
|
5372d87202 | ||
|
|
cdd238e204 | ||
|
|
1fa5fead70 | ||
|
|
9d719f4876 | ||
|
|
7ab711aea7 | ||
|
|
0beee7545b | ||
|
|
8470ca8ca0 | ||
|
|
d54457fca5 | ||
|
|
f34f823b6d | ||
|
|
e326e1296e | ||
|
|
0866544474 | ||
|
|
3646b1fc49 | ||
|
|
c14d19c420 | ||
|
|
82cb489cfa | ||
|
|
6ebd943f9b | ||
|
|
b22c195f60 | ||
|
|
d18a573a5a | ||
|
|
084b18d095 | ||
|
|
46f5010426 | ||
|
|
11e6159e0a | ||
|
|
92e292f4ac | ||
|
|
41fb7bc3b2 | ||
|
|
452ee198d1 | ||
|
|
1b5751bd40 | ||
|
|
e32dbf40e4 | ||
|
|
ee55e148ac | ||
|
|
b4c86c6690 | ||
|
|
623b7bfebe | ||
|
|
5962a60bb6 | ||
|
|
64e94601b1 | ||
|
|
9a21634052 | ||
|
|
68c62d7623 | ||
|
|
1fcc12525f | ||
|
|
d8fbf7c1f4 | ||
|
|
6866d48ebc | ||
|
|
4c688fe744 | ||
|
|
7e63addd75 | ||
|
|
39cb95ac04 | ||
|
|
522b89debe | ||
|
|
1a9324bbe4 | ||
|
|
ba5ae74c22 | ||
|
|
f19df69de7 | ||
|
|
99dc5113f2 | ||
|
|
08eec953ba | ||
|
|
56f50e3be1 | ||
|
|
0fdac299a8 | ||
|
|
febdac9a24 | ||
|
|
2fa63d1fd5 | ||
|
|
3d7e9ddb85 | ||
|
|
d3b2e4fb2a |
121
.marte_schema.cue
Normal file
121
.marte_schema.cue
Normal file
@@ -0,0 +1,121 @@
|
||||
package schema
|
||||
|
||||
#Classes: {
|
||||
ExtractBitGAM: {...}
|
||||
CompactBitGAM: {...}
|
||||
HttpService: {
|
||||
Port!: uint & >1024 & <49151
|
||||
WebRoot?: string
|
||||
Timeout?: uint
|
||||
ListenMaxConnection?: uint
|
||||
AcceptTimeout?: uint
|
||||
MaxNumberOfThreads?: uint
|
||||
MinNumberOfThreads?: uint
|
||||
}
|
||||
|
||||
HttpObjectBrowser: {
|
||||
Root!: string
|
||||
...
|
||||
}
|
||||
HttpDataMonitor: {
|
||||
...
|
||||
}
|
||||
HttpObjectBrowser: {
|
||||
Root!: string
|
||||
}
|
||||
HttpDirectoryResource: {
|
||||
BaseDir: string
|
||||
}
|
||||
HttpMessageInterface: {
|
||||
...
|
||||
}
|
||||
NI6528: {
|
||||
...
|
||||
}
|
||||
ConfigurationDatabase: {
|
||||
...
|
||||
}
|
||||
JAWFRecordGAM: {
|
||||
Directory!: string
|
||||
...
|
||||
}
|
||||
JAPreProgrammedGAM: {
|
||||
Directory!: string
|
||||
PreProgrammedPeriodMs!: uint32
|
||||
...
|
||||
}
|
||||
JAConditionalSignalUpdateGAM: {
|
||||
Operation!: "AND" | "OR" | "XOR" | "NOR"
|
||||
InputSignals: {
|
||||
[_]: {
|
||||
Comparator!: "EQUALS" | "GREATER" | "LESSER"
|
||||
Value!: number
|
||||
Type!: string
|
||||
...
|
||||
}
|
||||
}
|
||||
OutputSignals: {
|
||||
[_]: {
|
||||
DefaultValue!: uint32
|
||||
Value!: uint32
|
||||
Type!: string
|
||||
...
|
||||
}
|
||||
}
|
||||
...
|
||||
}
|
||||
JASourceChoiceGAM: {
|
||||
...
|
||||
}
|
||||
JAMessageGAM: {
|
||||
Operation!: "AND" | "OR"
|
||||
InputSignals: {
|
||||
[_]: {
|
||||
Value!: number
|
||||
Comparator!: "EQUALS" | "GREATER" | "LESS" | "EQUALS_OR_GREATER" | "EQUALS_OR_LESS" | "NOT"
|
||||
Type!: string
|
||||
...
|
||||
}
|
||||
}
|
||||
Event!: {
|
||||
Class: "Message"
|
||||
Destination!: string
|
||||
Function!: string
|
||||
}
|
||||
...
|
||||
}
|
||||
JAModeControlGAM: {
|
||||
...
|
||||
}
|
||||
JARTStateMachineGAM: {
|
||||
ConditionTrigger: 0 | 1
|
||||
mhvps_hvon: uint
|
||||
aps_hvon: uint
|
||||
aps_swon: uint
|
||||
bps_hvon: uint
|
||||
bps_swon: uint
|
||||
...
|
||||
}
|
||||
JASDNRTStateMachineGAM: {
|
||||
ConditionTrigger: 0 | 1
|
||||
mhvps_hvon: uint
|
||||
aps_hvon: uint
|
||||
aps_swon: uint
|
||||
bps_hvon: uint
|
||||
bps_swon: uint
|
||||
...
|
||||
}
|
||||
DANSource: {
|
||||
...
|
||||
}
|
||||
JATriangleWaveGAM: {
|
||||
...
|
||||
}
|
||||
JARampupGAM: {
|
||||
...
|
||||
}
|
||||
NI6683H: {
|
||||
BoardId: uint
|
||||
...
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ of the distribution package..
|
||||
<groupId>org.iter.codac.units</groupId>
|
||||
<artifactId>EC-GN-P01-PCF</artifactId>
|
||||
<packaging>codac</packaging>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
<name>CODAC Core System EC-GN subsystem</name>
|
||||
<description>CODAC Core System EC-GN subsystem</description>
|
||||
<url>http://www.iter.org/</url>
|
||||
@@ -87,9 +87,6 @@ of the distribution package..
|
||||
<include type="file" source="obj/Build/x86-linux/DataSources/JAEPICSCA/" target="${project.artifactId}/lib">
|
||||
<include>*.so</include>
|
||||
</include>
|
||||
<include type="file" source="obj/Build/x86-linux/DataSources/NI6528/" target="${project.artifactId}/lib">
|
||||
<include>*.so</include>
|
||||
</include>
|
||||
<include type="file" source="obj/Build/x86-linux/DataSources/RandomDataSource/" target="${project.artifactId}/lib">
|
||||
<include>*.so</include>
|
||||
</include>
|
||||
@@ -124,7 +121,7 @@ of the distribution package..
|
||||
<include type="file" source="obj/Build/x86-linux/GAMs/JASDNRTStateMachineGAM/" target="${project.artifactId}/lib">
|
||||
<include>*.so</include>
|
||||
</include>
|
||||
<include type="file" source="obj/Build/x86-linux/GAMs/JASourceChoiseGAM/" target="${project.artifactId}/lib">
|
||||
<include type="file" source="obj/Build/x86-linux/GAMs/JASourceChoiceGAM/" target="${project.artifactId}/lib">
|
||||
<include>*.so</include>
|
||||
</include>
|
||||
<include type="file" source="obj/Build/x86-linux/GAMs/JATerminalInterfaceGAM/" target="${project.artifactId}/lib">
|
||||
@@ -143,6 +140,18 @@ of the distribution package..
|
||||
target="/etc/opt/codac/${project.artifactId}">
|
||||
<include>*</include>
|
||||
</include>
|
||||
<include type="file"
|
||||
source="main/resources/mdt/"
|
||||
targetroot="SYSTEM_ROOT"
|
||||
target="/etc/opt/codac/${project.artifactId}">
|
||||
<include>*</include>
|
||||
</include>
|
||||
<include type="file"
|
||||
source="main/resources/dan/"
|
||||
targetroot="SYSTEM_ROOT"
|
||||
target="/etc/opt/codac/${project.artifactId}">
|
||||
<include>*</include>
|
||||
</include>
|
||||
<!-- Scripts -->
|
||||
<include type="script"
|
||||
scriptType="helper"
|
||||
@@ -177,7 +186,7 @@ of the distribution package..
|
||||
<servicetype>simple</servicetype>
|
||||
<user>root</user>
|
||||
<group>root</group>
|
||||
<execstart>%{codac_bin}/ec-gn-ja-pcf-gy.sh JAGyrotronA_FY19_P1.cfg</execstart>
|
||||
<execstart>%{codac_bin}/ec-gn-ja-pcf-gy.sh jada_gyro_rtapp</execstart>
|
||||
</include>
|
||||
<!-- Soft dependencies and service ordering -->
|
||||
<include type="file" source="-"
|
||||
@@ -188,26 +197,6 @@ of the distribution package..
|
||||
Wants=%{codac_service_prefix}-EC-GN-P01-PCF0CORE-ioc.service
|
||||
After=%{codac_service_prefix}-EC-GN-P01-PCF0CORE-ioc.service]]>
|
||||
<![CDATA[[Service]
|
||||
KillSignal=SIGINT]]>
|
||||
</include>
|
||||
<include type="service"
|
||||
name="ec-gn-ja-pcf-gyb"
|
||||
target="ec-gn-ja-services" autostart="true">
|
||||
<description>EC-GN-JA-PCF GYB daemon</description>
|
||||
<servicetype>simple</servicetype>
|
||||
<user>root</user>
|
||||
<group>root</group>
|
||||
<execstart>%{codac_bin}/ec-gn-ja-pcf-gy.sh JAGyrotronB_FY19_P1.cfg</execstart>
|
||||
</include>
|
||||
<!-- Soft dependencies and service ordering -->
|
||||
<include type="file" source="-"
|
||||
targetroot="SYSTEM_ROOT"
|
||||
target="%{_unitdir}/%{codac_service_prefix}-ec-gn-ja-pcf-gyb.service.d/override.conf"
|
||||
rpmeval="true">
|
||||
<![CDATA[[Unit]
|
||||
Wants=%{codac_service_prefix}-EC-GN-P01-PCF0CORE-ioc.service
|
||||
After=%{codac_service_prefix}-EC-GN-P01-PCF0CORE-ioc.service]]>
|
||||
<![CDATA[[Service]
|
||||
KillSignal=SIGINT]]>
|
||||
</include>
|
||||
<requires version="current">%{codac_rpm_prefix}-${project.artifactId}-lib</requires>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
SPB = RandomDataSource.x NI6528.x JAEPICSCA.x
|
||||
SPB = RandomDataSource.x JAEPICSCA.x
|
||||
|
||||
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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 for the specific language governing
|
||||
# permissions and limitations under the Licence.
|
||||
#
|
||||
# $Id: Makefile.gcc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
LIBRARIES += -L$(CODAC_ROOT)/lib/ -lpxi6528
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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 for the specific language governing
|
||||
# permissions and limitations under the Licence.
|
||||
#
|
||||
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
OBJSX=NI6528.x
|
||||
|
||||
PACKAGE=DataSources
|
||||
|
||||
ROOT_DIR=../../../../obj
|
||||
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
|
||||
|
||||
INCLUDES += -I.
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L0Types
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L1Portability
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L2Objects
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L3Streams
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L4Messages
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L4Configuration
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L5GAMs
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L1Portability
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L3Services
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L4Messages
|
||||
INCLUDES += -I$(CODAC_ROOT)/include/
|
||||
|
||||
all: $(OBJS) $(SUBPROJ) \
|
||||
$(BUILD_DIR)/NI6528$(LIBEXT) \
|
||||
$(BUILD_DIR)/NI6528$(DLLEXT)
|
||||
echo $(OBJS)
|
||||
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
/**
|
||||
* @file NI6528.cpp
|
||||
* @brief Source file for class NI6528
|
||||
* @date 01/03/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 source file contains the definition of all the methods for
|
||||
* the class NI6528 (public, protected, and private). Be aware that some
|
||||
* methods, such as those inline could be defined on the header file, instead.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Standard header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "AdvancedErrorManagement.h"
|
||||
#include "CompilerTypes.h"
|
||||
#include "NI6528.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Static definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
NI6528::NI6528() :
|
||||
MARTe::DataSourceI() {
|
||||
using namespace MARTe;
|
||||
previousValue = 0u;
|
||||
value = 0u;
|
||||
port = 0u;
|
||||
boardFileDescriptor = 0;
|
||||
}
|
||||
|
||||
NI6528::~NI6528() {
|
||||
using namespace MARTe;
|
||||
(void) pxi6528_close_device(boardFileDescriptor);
|
||||
}
|
||||
|
||||
bool NI6528::SetConfiguredDatabase(MARTe::StructuredDataI & data) {
|
||||
using namespace MARTe;
|
||||
bool ok = (DataSourceI::SetConfiguredDatabase(data));
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "DataSourceI::SetConfiguredDatabas() failed");
|
||||
}
|
||||
if (ok) {
|
||||
ok = (GetNumberOfSignals() == 1u);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "GetNumberOfSignals() != 1u");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
ok = (GetSignalType(0u) == UnsignedInteger8Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "GetSignalType(0u) != UnsignedInteger8Bit");
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool NI6528::Initialise(MARTe::StructuredDataI & data) {
|
||||
using namespace MARTe;
|
||||
bool ok = DataSourceI::Initialise(data);
|
||||
if (ok) {
|
||||
ok = data.Read("Port", port);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "The Port shall be specified");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.Read("DeviceName", deviceName);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "The DeviceName shall be specified");
|
||||
}
|
||||
}
|
||||
int32 ret = pxi6528_open_device(&boardFileDescriptor, deviceName.Buffer(), O_NONBLOCK);
|
||||
ok = (ret == 0);
|
||||
if (!ok) {
|
||||
StreamString err = strerror(-ret);
|
||||
REPORT_ERROR(ErrorManagement::FatalError, "Could not open device (%s) : %s", deviceName.Buffer(), err.Buffer());
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool NI6528::Synchronise() {
|
||||
using namespace MARTe;
|
||||
if(previousValue != value){
|
||||
int32 ret = (pxi6528_write_port(boardFileDescriptor, port, value) > 0);
|
||||
previousValue = value;
|
||||
bool ok = (ret > -1);
|
||||
if (!ok) {
|
||||
StreamString err = strerror(-ret);
|
||||
REPORT_ERROR(ErrorManagement::FatalError, "Could not write to device (%s) : %s", deviceName.Buffer(), err.Buffer());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NI6528::AllocateMemory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NI6528::GetSignalMemoryBuffer(const MARTe::uint32 signalIdx, const MARTe::uint32 bufferIdx, void *&signalAddress) {
|
||||
signalAddress = &value;
|
||||
return true;
|
||||
}
|
||||
|
||||
const MARTe::char8 *NI6528::GetBrokerName(MARTe::StructuredDataI &data, const MARTe::SignalDirection direction) {
|
||||
using namespace MARTe;
|
||||
return "MemoryMapSynchronisedOutputBroker";
|
||||
}
|
||||
|
||||
bool NI6528::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
|
||||
return true;
|
||||
}
|
||||
|
||||
CLASS_REGISTER(NI6528, "1.0")
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
/**
|
||||
* @file NI6528.h
|
||||
* @brief Header file for class NI6528
|
||||
* @date 07/06/2018
|
||||
* @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 NI6528
|
||||
* 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 RANDOM_DATASOURCE_H_
|
||||
#define RANDOM_DATASOURCE_H_
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Standard header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include <pxi6528.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "DataSourceI.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Class declaration */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief NI6528 simplified data source implementation.
|
||||
*
|
||||
* The configuration syntax is (names and signal quantities are only given as an example):
|
||||
* +NI6528 = {
|
||||
* Class = NI6528
|
||||
* DeviceName = "/dev/pxi6528.0" //Mandatory
|
||||
* Port = 0 //The port where to write
|
||||
* Signals = {
|
||||
* currentValue = {Type = uint8}
|
||||
* bitmask = {Type = uint8}
|
||||
* Value = {Type = uint8}
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
class NI6528: public MARTe::DataSourceI {
|
||||
public:
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
|
||||
/**
|
||||
* @brief Constructor. NOOP.
|
||||
*/
|
||||
NI6528 ();
|
||||
|
||||
/**
|
||||
* @brief Destructor. NOOP.
|
||||
*/
|
||||
virtual ~NI6528();
|
||||
|
||||
/**
|
||||
* @brief The configuration data detailed in the class description
|
||||
* @return true if all the compulsory parameters are set.
|
||||
*/
|
||||
virtual bool Initialise(MARTe::StructuredDataI & data);
|
||||
|
||||
/**
|
||||
* @brief Verifies that at most one signal has been set with the correct type (i.e. any integer).
|
||||
* @return true if the above conditions are met.
|
||||
*/
|
||||
virtual bool SetConfiguredDatabase(MARTe::StructuredDataI & data);
|
||||
|
||||
/**
|
||||
* @brief @see DataSourceI::Synchronise
|
||||
*/
|
||||
virtual bool Synchronise();
|
||||
|
||||
/**
|
||||
* @brief @see DataSourceI::AllocateMemory
|
||||
*/
|
||||
virtual bool AllocateMemory();
|
||||
|
||||
/**
|
||||
* @brief @see DataSourceI::GetSignalMemoryBuffer
|
||||
*/
|
||||
virtual bool GetSignalMemoryBuffer(const MARTe::uint32 signalIdx, const MARTe::uint32 bufferIdx, void *&signalAddress);
|
||||
|
||||
/**
|
||||
* @return "MemoryMapSynchronisedInputBroker"
|
||||
*/
|
||||
virtual const MARTe::char8 *GetBrokerName(MARTe::StructuredDataI &data, const MARTe::SignalDirection direction);
|
||||
|
||||
/**
|
||||
* @brief NOOP
|
||||
*/
|
||||
virtual bool PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName);
|
||||
|
||||
private:
|
||||
/**
|
||||
* The previous value to write.
|
||||
*/
|
||||
MARTe::uint8 previousValue;
|
||||
|
||||
/**
|
||||
* The bitmask to write value. (new value) = (current value) || (bitmask) && (write value)
|
||||
*/
|
||||
MARTe::uint8 bitmask;
|
||||
|
||||
/**
|
||||
* The value to write.
|
||||
*/
|
||||
MARTe::uint8 value;
|
||||
|
||||
/**
|
||||
* The port number
|
||||
*/
|
||||
MARTe::uint32 port;
|
||||
|
||||
/**
|
||||
* The board file descriptor
|
||||
*/
|
||||
pxi6528_device_t boardFileDescriptor;
|
||||
|
||||
/**
|
||||
* The device name
|
||||
*/
|
||||
MARTe::StreamString deviceName;
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Inline method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#endif /* RANDOM_DATASOURCE_H_ */
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* or implied. See the Licence permissions and limitations under the Licence.
|
||||
|
||||
* @details This source file contains the definition of all the methods for
|
||||
* the class JAConditionalSignalUpdateGAM (public, protected, and private). Be aware that some
|
||||
* the class JAConditionalSignalUpdateGAM (public, protected, and private). Be
|
||||
aware that some
|
||||
* methods, such as those inline could be defined on the header file, instead.
|
||||
*/
|
||||
|
||||
@@ -28,8 +29,11 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "JAConditionalSignalUpdateGAM.h"
|
||||
#include "AdvancedErrorManagement.h"
|
||||
#include "Architecture/x86_gcc/CompilerTypes.h"
|
||||
#include "ErrorType.h"
|
||||
#include "JAConditionalSignalUpdateGAM.h"
|
||||
#include "TypeDescriptor.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Static definitions */
|
||||
@@ -39,271 +43,276 @@
|
||||
/* Method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
bool parse_comparator(const MARTe::StreamString &str,
|
||||
JAConditionalSignalUpdateGAM::ComparisonMode &op) {
|
||||
if (str == "EQUALS") {
|
||||
op = JAConditionalSignalUpdateGAM::Equals;
|
||||
return true;
|
||||
}
|
||||
if (str == "NOT") {
|
||||
op = JAConditionalSignalUpdateGAM::Not;
|
||||
return true;
|
||||
}
|
||||
if (str == "GREATER") {
|
||||
op = JAConditionalSignalUpdateGAM::Greater;
|
||||
return true;
|
||||
}
|
||||
if (str == "EQUALS_OR_GREATER") {
|
||||
op = JAConditionalSignalUpdateGAM::EqualsOrGreater;
|
||||
return true;
|
||||
}
|
||||
if (str == "LESS") {
|
||||
op = JAConditionalSignalUpdateGAM::Less;
|
||||
return true;
|
||||
}
|
||||
if (str == "EQUALS_OR_LESS") {
|
||||
op = JAConditionalSignalUpdateGAM::EqualsOrLess;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
JAConditionalSignalUpdateGAM::JAConditionalSignalUpdateGAM() {
|
||||
inputSignals = NULL_PTR(void **);
|
||||
inputSignalTypes = NULL_PTR(MARTe::TypeDescriptor *);
|
||||
values = NULL_PTR(MARTe::uint32 *);
|
||||
valuesCount = 0u;
|
||||
outputSignals = NULL_PTR(MARTe::uint32 **);
|
||||
defaultValues = NULL_PTR(MARTe::uint32 **);
|
||||
needsReset = false;
|
||||
expectedValues = NULL_PTR(MARTe::uint32 *);
|
||||
expectedValuesCount = 0u;
|
||||
operation = And;
|
||||
comparators = NULL_PTR(ComparisonMode *);
|
||||
inputSignals = NULL_PTR(void **);
|
||||
inputSignalTypes = NULL_PTR(MARTe::TypeDescriptor *);
|
||||
comparators = NULL_PTR(comparator_t *);
|
||||
outputSignals = NULL_PTR(MARTe::uint32 **);
|
||||
outputs = NULL_PTR(output_t *);
|
||||
needsReset = false;
|
||||
operation = And;
|
||||
}
|
||||
|
||||
JAConditionalSignalUpdateGAM::~JAConditionalSignalUpdateGAM() {
|
||||
if (outputSignals != NULL_PTR(MARTe::uint32 **)) {
|
||||
delete[] outputSignals;
|
||||
}
|
||||
if (inputSignals != NULL_PTR(void **)) {
|
||||
delete[] inputSignals;
|
||||
}
|
||||
if (inputSignalTypes != NULL_PTR(MARTe::TypeDescriptor *)) {
|
||||
delete[] inputSignalTypes;
|
||||
}
|
||||
if (values != NULL_PTR(MARTe::uint32 *)) {
|
||||
delete[] values;
|
||||
}
|
||||
if (comparators != NULL_PTR(ComparisonMode *)) {
|
||||
delete[] comparators;
|
||||
}
|
||||
if (defaultValues != NULL_PTR(MARTe::uint32 **)) {
|
||||
delete[] defaultValues;
|
||||
}
|
||||
if (outputSignals != NULL_PTR(MARTe::uint32 **)) {
|
||||
delete[] outputSignals;
|
||||
}
|
||||
if (inputSignals != NULL_PTR(void **)) {
|
||||
delete[] inputSignals;
|
||||
}
|
||||
if (inputSignalTypes != NULL_PTR(MARTe::TypeDescriptor *)) {
|
||||
delete[] inputSignalTypes;
|
||||
}
|
||||
if (outputs != NULL_PTR(output_t *)) {
|
||||
delete[] outputs;
|
||||
}
|
||||
if (comparators != NULL_PTR(comparator_t *)) {
|
||||
delete[] comparators;
|
||||
}
|
||||
}
|
||||
|
||||
bool JAConditionalSignalUpdateGAM::Initialise(MARTe::StructuredDataI & data) {
|
||||
using namespace MARTe;
|
||||
bool ok = GAM::Initialise(data);
|
||||
if (ok) {
|
||||
// Read expected values.
|
||||
AnyType valuesArray = data.GetType("ExpectedValues");
|
||||
|
||||
if (valuesArray.GetDataPointer() != NULL) {
|
||||
expectedValuesCount = valuesArray.GetNumberOfElements(0u);
|
||||
|
||||
expectedValues = new uint32[expectedValuesCount];
|
||||
|
||||
Vector<uint32> valuesVector(expectedValues, expectedValuesCount);
|
||||
ok = (data.Read("ExpectedValues", valuesVector));
|
||||
}
|
||||
bool JAConditionalSignalUpdateGAM::Initialise(MARTe::StructuredDataI &data) {
|
||||
using namespace MARTe;
|
||||
bool ok = GAM::Initialise(data);
|
||||
if (ok) {
|
||||
MARTe::StreamString operationStr;
|
||||
if (data.Read("Operation", operationStr)) {
|
||||
if (operationStr == "AND") {
|
||||
operation = And;
|
||||
} else if (operationStr == "OR") {
|
||||
operation = Or;
|
||||
} else if (operationStr == "NOR") {
|
||||
operation = Nor;
|
||||
} else if (operationStr == "XOR") {
|
||||
operation = Xor;
|
||||
} else {
|
||||
ok = false;
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Operation %s is not defined", operationStr.Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.MoveRelative("InputSignals");
|
||||
uint32 level = 0;
|
||||
if (ok) {
|
||||
// Read comparators.
|
||||
AnyType comparatorsArray = data.GetType("Comparators");
|
||||
if (comparatorsArray.GetDataPointer() != NULL) {
|
||||
uint32 count;
|
||||
if (ok) {
|
||||
count = comparatorsArray.GetNumberOfElements(0u);
|
||||
ok = count == expectedValuesCount;
|
||||
}
|
||||
if (ok) {
|
||||
comparators = new ComparisonMode[count];
|
||||
StreamString* comp = new StreamString[count];
|
||||
Vector<StreamString> compVector(comp, count);
|
||||
|
||||
ok = (data.Read("Comparators", compVector));
|
||||
|
||||
if (ok) {
|
||||
for (uint32 i = 0; i < count; ++i) {
|
||||
if (comp[i] == "EQUALS") {
|
||||
comparators[i] = Equals;
|
||||
} else if (comp[i] == "NOT") {
|
||||
comparators[i] = Not;
|
||||
} else if (comp[i] == "GREATER") {
|
||||
comparators[i] = Greater;
|
||||
} else if (comp[i] == "EQUALS_OR_GREATER") {
|
||||
comparators[i] = EqualsOrGreater;
|
||||
} else if (comp[i] == "LESS") {
|
||||
comparators[i] = Less;
|
||||
} else if (comp[i] == "EQUALS_OR_LESS") {
|
||||
comparators[i] = EqualsOrLess;
|
||||
} else {
|
||||
ok = false;
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Comparator %s is not defined.", comp[i].Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
delete[] comp;
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Expected values and operators shall have the same "
|
||||
"number of elements.");
|
||||
}
|
||||
} else {
|
||||
// Create default comparators (equals) when they aren't provided in the configuration.
|
||||
comparators = new ComparisonMode[expectedValuesCount];
|
||||
for (uint32 i = 0; i < expectedValuesCount; ++i) {
|
||||
comparators[i] = Equals;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
MARTe::StreamString operationStr;
|
||||
if (data.Read("Operation", operationStr)) {
|
||||
if (operationStr == "AND") {
|
||||
operation = And;
|
||||
}
|
||||
else if (operationStr == "OR") {
|
||||
operation = Or;
|
||||
}
|
||||
else if (operationStr == "NOR") {
|
||||
operation = Nor;
|
||||
}
|
||||
else if (operationStr == "XOR") {
|
||||
operation = Xor;
|
||||
}
|
||||
else {
|
||||
ok = false;
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Operation %s is not defined", operationStr.Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
// Read output signal values to be set.
|
||||
AnyType valuesArray = data.GetType("Values");
|
||||
ok = (valuesArray.GetDataPointer() != NULL);
|
||||
|
||||
if (ok) {
|
||||
valuesCount = valuesArray.GetNumberOfElements(0u);
|
||||
ok = valuesCount > 0u;
|
||||
}
|
||||
if (ok) {
|
||||
values = new uint32[valuesCount];
|
||||
|
||||
Vector<uint32> valuesVector(values, valuesCount);
|
||||
ok = (data.Read("Values", valuesVector));
|
||||
}
|
||||
level++;
|
||||
uint32 n_inputs = data.GetNumberOfChildren();
|
||||
inputSignalTypes = new TypeDescriptor[n_inputs];
|
||||
comparators = new comparator_t[n_inputs];
|
||||
StreamString strbuff;
|
||||
TypeDescriptor td;
|
||||
for (uint32 i = 0; ok && i < n_inputs; i++) {
|
||||
ok = data.MoveToChild(i);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Values shall be defined.");
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Impossible to move to InputSignals[%lu]", i);
|
||||
break;
|
||||
}
|
||||
level++;
|
||||
strbuff = "";
|
||||
ok = data.Read("Type", strbuff);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Missing mandatory field Type from InputSignals[%lu]",
|
||||
i);
|
||||
break;
|
||||
}
|
||||
td = TypeDescriptor::GetTypeDescriptorFromTypeName(strbuff.Buffer());
|
||||
ok = (td == UnsignedInteger8Bit) || (td == UnsignedInteger16Bit) ||
|
||||
(td == UnsignedInteger32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Wrong value for field Type from InputSignals[%d]", i);
|
||||
break;
|
||||
}
|
||||
inputSignalTypes[i] = td;
|
||||
strbuff = "";
|
||||
ok = data.Read("Comparator", strbuff);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(
|
||||
ErrorManagement::ParametersError,
|
||||
"Missing mandatory field Comparator from InputSignals[%d]", i);
|
||||
break;
|
||||
}
|
||||
ok = parse_comparator(strbuff, comparators[i].comparator);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Non Valid Comparator `%s` from InputSignals[%d]",
|
||||
strbuff.Buffer(), i);
|
||||
break;
|
||||
}
|
||||
ok = data.Read("Value", comparators[i].value);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(
|
||||
ErrorManagement::ParametersError,
|
||||
"Missing field Value (expecting int) from InputSignals[%lu]", i);
|
||||
break;
|
||||
}
|
||||
if (data.MoveToAncestor(1)) {
|
||||
level--;
|
||||
} else {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
data.MoveToAncestor(level);
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Impossible to move to InputSignals");
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.MoveRelative("OutputSignals");
|
||||
uint32 level = 0;
|
||||
if (ok) {
|
||||
level++;
|
||||
uint32 n_outputs = data.GetNumberOfChildren();
|
||||
outputs = new output_t[n_outputs];
|
||||
for (uint32 i = 0; ok && i < n_outputs; i++) {
|
||||
ok = data.MoveToChild(i);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Impossible to move to InputSignals[%lu]", i);
|
||||
break;
|
||||
}
|
||||
level++;
|
||||
ok = data.Read("DefaultValue", outputs[i].defaultValue);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Impossible to read field DefaultValue for output %lu",
|
||||
i);
|
||||
break;
|
||||
}
|
||||
ok = data.Read("Value", outputs[i].value);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Impossible to read field Value for output %lu", i);
|
||||
break;
|
||||
}
|
||||
ok = data.MoveToAncestor(1);
|
||||
if (ok) {
|
||||
level--;
|
||||
}
|
||||
}
|
||||
data.MoveToAncestor(level);
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Impossible to move to OutputSignals");
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAConditionalSignalUpdateGAM::Setup() {
|
||||
using namespace MARTe;
|
||||
bool ok = numberOfInputSignals == (expectedValuesCount + numberOfOutputSignals);
|
||||
using namespace MARTe;
|
||||
bool ok = numberOfInputSignals > 0;
|
||||
if (ok) {
|
||||
inputSignals = new void *[numberOfInputSignals];
|
||||
uint32 i;
|
||||
for (uint32 i = 0u; i < numberOfInputSignals; i++) {
|
||||
inputSignals[i] = GetInputSignalMemory(i);
|
||||
}
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Number of input signals shall be greater then 0 ");
|
||||
}
|
||||
if (ok) {
|
||||
ok = numberOfOutputSignals > 0u;
|
||||
if (ok) {
|
||||
inputSignals = new void*[expectedValuesCount];
|
||||
defaultValues = new uint32*[numberOfOutputSignals];
|
||||
uint32 i;
|
||||
for (i = 0u; i < expectedValuesCount; i++) {
|
||||
inputSignals[i] = GetInputSignalMemory(i);
|
||||
}
|
||||
for (; i < numberOfInputSignals; i++) {
|
||||
defaultValues[i - expectedValuesCount] = reinterpret_cast<uint32 *>(GetInputSignalMemory(i));
|
||||
}
|
||||
outputSignals = new uint32 *[numberOfOutputSignals];
|
||||
for (uint32 i = 0u; i < numberOfOutputSignals; i++) {
|
||||
outputSignals[i] = reinterpret_cast<uint32 *>(GetOutputSignalMemory(i));
|
||||
}
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Number of input signals shall be equal to number "
|
||||
"of expected values plus number of output signals.");
|
||||
}
|
||||
if (ok) {
|
||||
inputSignalTypes = new TypeDescriptor[expectedValuesCount];
|
||||
uint32 i;
|
||||
for (i = 0u; (i < expectedValuesCount) && (ok); i++) {
|
||||
inputSignalTypes[i] = GetSignalType(InputSignals, i);
|
||||
ok = ((inputSignalTypes[i] == UnsignedInteger32Bit) || (inputSignalTypes[i] == UnsignedInteger16Bit));
|
||||
if (!ok) {
|
||||
StreamString signalName;
|
||||
(void) GetSignalName(InputSignals, i, signalName);
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Signal %s shall be defined as uint32 or uint16", signalName.Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
ok = numberOfOutputSignals == valuesCount;
|
||||
if (ok) {
|
||||
ok = numberOfOutputSignals > 0u;
|
||||
if (ok) {
|
||||
outputSignals = new uint32*[numberOfOutputSignals];
|
||||
uint32 i;
|
||||
for (i = 0u; i < numberOfOutputSignals; i++) {
|
||||
outputSignals[i] = reinterpret_cast<uint32 *>(GetOutputSignalMemory(i));
|
||||
}
|
||||
}
|
||||
else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "At least one output signal shall be defined");
|
||||
}
|
||||
}
|
||||
else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Number of output signals shall be the same as "
|
||||
"number of provided values.");
|
||||
}
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"At least one output signal shall be defined");
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAConditionalSignalUpdateGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
|
||||
needsReset = false;
|
||||
return true;
|
||||
bool JAConditionalSignalUpdateGAM::PrepareNextState(
|
||||
const MARTe::char8 *const currentStateName,
|
||||
const MARTe::char8 *const nextStateName) {
|
||||
needsReset = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool accumulate(JAConditionalSignalUpdateGAM::OperationMode mode, bool next,
|
||||
bool current) {
|
||||
switch (mode) {
|
||||
case JAConditionalSignalUpdateGAM::Or:
|
||||
return next || current;
|
||||
case JAConditionalSignalUpdateGAM::And:
|
||||
return next && current;
|
||||
case JAConditionalSignalUpdateGAM::Nor:
|
||||
return !(next || current);
|
||||
case JAConditionalSignalUpdateGAM::Xor:
|
||||
return (!next != !current);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool JAConditionalSignalUpdateGAM::Execute() {
|
||||
if (!needsReset) {
|
||||
bool eventDetected = expectedValuesCount == 0;
|
||||
if (!eventDetected) {
|
||||
if (operation == Or) {
|
||||
MARTe::uint32 j;
|
||||
for (j = 0; (j < expectedValuesCount) && (!eventDetected); j++) {
|
||||
eventDetected = Compare(j);
|
||||
}
|
||||
}
|
||||
else if (operation == Nor) {
|
||||
MARTe::uint32 j;
|
||||
for (j = 0; (j < expectedValuesCount) && (!eventDetected); j++) {
|
||||
eventDetected = Compare(j);
|
||||
}
|
||||
eventDetected = !eventDetected;
|
||||
}
|
||||
else if (operation == And) {
|
||||
MARTe::uint32 j;
|
||||
eventDetected = Compare(0);
|
||||
for (j = 1; (j < expectedValuesCount); j++) {
|
||||
eventDetected &= Compare(j);
|
||||
}
|
||||
}
|
||||
else if (operation == Xor) {
|
||||
MARTe::uint32 j;
|
||||
MARTe::uint32 eventDetectedUint32;
|
||||
if (inputSignalTypes[0] == MARTe::UnsignedInteger32Bit) {
|
||||
eventDetectedUint32 = *static_cast<MARTe::uint32 *>(inputSignals[0]);
|
||||
}
|
||||
else {
|
||||
eventDetectedUint32 = *static_cast<MARTe::uint16 *>(inputSignals[0]);
|
||||
}
|
||||
for (j = 1; (j < expectedValuesCount); j++) {
|
||||
eventDetectedUint32 ^= Compare(j);
|
||||
}
|
||||
eventDetected = (eventDetectedUint32 == 1u);
|
||||
}
|
||||
}
|
||||
if (eventDetected) {
|
||||
needsReset = true;
|
||||
MARTe::uint32 i;
|
||||
for (i = 0u; i < numberOfOutputSignals; ++i) {
|
||||
*outputSignals[i] = values[i];
|
||||
MARTe::StreamString signalName;
|
||||
(void) GetSignalName(MARTe::OutputSignals, i, signalName);
|
||||
}
|
||||
}
|
||||
else {
|
||||
MARTe::uint32 i;
|
||||
for (i = 0u; i < numberOfOutputSignals; ++i) {
|
||||
*outputSignals[i] = *defaultValues[i];
|
||||
}
|
||||
}
|
||||
if (!needsReset) {
|
||||
bool state = Compare(0);
|
||||
for (MARTe::uint32 i = 1; i < numberOfInputSignals; i++) {
|
||||
state = accumulate(operation, Compare(i), state);
|
||||
}
|
||||
return true;
|
||||
if (state) {
|
||||
needsReset = true;
|
||||
MARTe::uint32 i;
|
||||
for (i = 0u; i < numberOfOutputSignals; i++) {
|
||||
*outputSignals[i] = outputs[i].value;
|
||||
}
|
||||
} else {
|
||||
MARTe::uint32 i;
|
||||
for (i = 0u; i < numberOfOutputSignals; i++) {
|
||||
*outputSignals[i] = outputs[i].defaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool JAConditionalSignalUpdateGAM::Compare(MARTe::uint32 index) {
|
||||
if (inputSignalTypes[index] == MARTe::UnsignedInteger32Bit) {
|
||||
return Compare<MARTe::uint32>(index);
|
||||
}
|
||||
return Compare<MARTe::uint16>(index);
|
||||
if (inputSignalTypes[index] == MARTe::UnsignedInteger32Bit) {
|
||||
return Compare<MARTe::uint32>(index);
|
||||
}
|
||||
if (inputSignalTypes[index] == MARTe::UnsignedInteger8Bit) {
|
||||
return Compare<MARTe::uint8>(index);
|
||||
}
|
||||
return Compare<MARTe::uint16>(index);
|
||||
}
|
||||
|
||||
CLASS_REGISTER(JAConditionalSignalUpdateGAM, "1.0")
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* 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 JAConditionalSignalUpdateGAM
|
||||
* @details This header file contains the declaration of the class
|
||||
JAConditionalSignalUpdateGAM
|
||||
* 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.
|
||||
*/
|
||||
@@ -31,6 +32,7 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "Architecture/x86_gcc/CompilerTypes.h"
|
||||
#include "GAM.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
@@ -38,20 +40,24 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief GAM that writes predefined values to output signals when a condition is met.
|
||||
* If there are no conditional signals provided, the condition is presumed to be met.
|
||||
* @brief GAM that writes predefined values to output signals when a condition
|
||||
* is met. If there are no conditional signals provided, the condition is
|
||||
* presumed to be met.
|
||||
*
|
||||
* +ASYNCShotlengthControlGAM = {
|
||||
* Class = JAConditionalSignalUpdateGAM
|
||||
* Operation = OR // Logical operation performed between conditional signals
|
||||
* Operation = OR // Logical operation performed between conditional
|
||||
* signals
|
||||
* // Supported values: AND, OR, XOR, NOR
|
||||
* // Default: AND
|
||||
* ExpectedValues = {1 1} // Values to which conditional signals will be compared.
|
||||
* Comparators = {EQUALS EQUALS} // Operator between conditional signal an expected value
|
||||
* // Supported values: EQUALS, NOT, GREATER, EQUALS_OR_GREATER, LESS, EQUALS_OR_LESS
|
||||
* ExpectedValues = {1 1} // Values to which conditional signals will
|
||||
* be compared. Comparators = {EQUALS EQUALS} // Operator between conditional
|
||||
* signal an expected value
|
||||
* // Supported values: EQUALS, NOT,
|
||||
* GREATER, EQUALS_OR_GREATER, LESS, EQUALS_OR_LESS
|
||||
* // Default: EQUALS
|
||||
* Values = {0 3} // Values that will be written to output signals when condition is met.
|
||||
* InputSignals = {
|
||||
* Values = {0 3} // Values that will be written to output signals when
|
||||
* condition is met. InputSignals = {
|
||||
* // Conditional Signals
|
||||
* SHOTLEN_FLAG = {
|
||||
* DataSource = DDB1
|
||||
@@ -61,15 +67,13 @@
|
||||
* DataSource = DDB1
|
||||
* Type = uint32
|
||||
* }
|
||||
* // Default values (set to output signals before the condition is met)
|
||||
* APS_SWON = { // APS_SWON will keep the value from previous state.
|
||||
* // Default values (set to output signals before the condition is
|
||||
* met) APS_SWON = { // APS_SWON will keep the value from previous state.
|
||||
* DataSource = DDB1
|
||||
* Type = uint32
|
||||
* }
|
||||
* BPS_SWON_DEFAULT = { // BPS_SWON will be set to 7 before condition is met.
|
||||
* DataSource = DDB1
|
||||
* Type = uint32
|
||||
* Default = 7
|
||||
* BPS_SWON_DEFAULT = { // BPS_SWON will be set to 7 before
|
||||
* condition is met. DataSource = DDB1 Type = uint32 Default = 7
|
||||
* }
|
||||
* }
|
||||
* OutputSignals = {
|
||||
@@ -84,97 +88,89 @@
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
class JAConditionalSignalUpdateGAM : public MARTe::GAM, public MARTe::StatefulI {
|
||||
class JAConditionalSignalUpdateGAM : public MARTe::GAM,
|
||||
public MARTe::StatefulI {
|
||||
public:
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
|
||||
JAConditionalSignalUpdateGAM();
|
||||
JAConditionalSignalUpdateGAM();
|
||||
|
||||
virtual ~JAConditionalSignalUpdateGAM();
|
||||
virtual ~JAConditionalSignalUpdateGAM();
|
||||
|
||||
virtual bool Initialise(MARTe::StructuredDataI & data);
|
||||
virtual bool Initialise(MARTe::StructuredDataI &data);
|
||||
|
||||
virtual bool Setup();
|
||||
virtual bool Setup();
|
||||
|
||||
virtual bool Execute();
|
||||
virtual bool Execute();
|
||||
|
||||
virtual bool PrepareNextState(const MARTe::char8 * const currentStateName,
|
||||
const MARTe::char8 * const nextStateName);
|
||||
virtual bool PrepareNextState(const MARTe::char8 *const currentStateName,
|
||||
const MARTe::char8 *const nextStateName);
|
||||
|
||||
enum ComparisonMode {
|
||||
Equals,
|
||||
Not,
|
||||
Greater,
|
||||
EqualsOrGreater,
|
||||
Less,
|
||||
EqualsOrLess
|
||||
};
|
||||
enum OperationMode { And, Or, Xor, Nor };
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Does the input signal at provided index have the expected value.
|
||||
* @param[in] index of the signal.
|
||||
* @return true if the signal has expected value.
|
||||
*/
|
||||
bool Compare(MARTe::uint32 index);
|
||||
/**
|
||||
* @brief Does the input signal at provided index have the expected value.
|
||||
* @param[in] index of the signal.
|
||||
* @return true if the signal has expected value.
|
||||
*/
|
||||
bool Compare(MARTe::uint32 index);
|
||||
|
||||
template <class T>
|
||||
bool Compare(MARTe::uint32 index);
|
||||
template <class T> bool Compare(MARTe::uint32 index);
|
||||
|
||||
enum OperationMode {
|
||||
And, Or, Xor, Nor
|
||||
};
|
||||
// Input signals
|
||||
void **inputSignals;
|
||||
|
||||
enum ComparisonMode {
|
||||
Equals, Not, Greater, EqualsOrGreater, Less, EqualsOrLess
|
||||
};
|
||||
MARTe::TypeDescriptor *inputSignalTypes;
|
||||
struct comparator_t {
|
||||
ComparisonMode comparator;
|
||||
MARTe::uint32 value;
|
||||
};
|
||||
comparator_t *comparators;
|
||||
// Condition operation.
|
||||
OperationMode operation;
|
||||
|
||||
// Input signals
|
||||
void **inputSignals;
|
||||
// Output signals
|
||||
MARTe::uint32 **outputSignals;
|
||||
struct output_t {
|
||||
MARTe::uint32 value;
|
||||
MARTe::uint32 defaultValue;
|
||||
};
|
||||
output_t *outputs;
|
||||
|
||||
MARTe::TypeDescriptor *inputSignalTypes;
|
||||
|
||||
// Condition operation.
|
||||
OperationMode operation;
|
||||
|
||||
// Array of expected values of input signals.
|
||||
MARTe::uint32* expectedValues;
|
||||
|
||||
// Expected values count (must be equal to numberOfInputSignals)
|
||||
MARTe::uint32 expectedValuesCount;
|
||||
|
||||
// Array of comparators
|
||||
ComparisonMode* comparators;
|
||||
|
||||
// Values to be written on output signals when input signal has the expected value.
|
||||
MARTe::uint32 *values;
|
||||
|
||||
// Number of values (must be equal to numberOfOutputSignals)
|
||||
MARTe::uint32 valuesCount;
|
||||
|
||||
// Output signals
|
||||
MARTe::uint32 **outputSignals;
|
||||
|
||||
// Default values of output signals
|
||||
MARTe::uint32 **defaultValues;
|
||||
|
||||
// Were output signals already set and we are waiting for a state change before they are set again.
|
||||
bool needsReset;
|
||||
// Were output signals already set and we are waiting for a state change
|
||||
// before they are set again.
|
||||
bool needsReset;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Inline method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
template <class T>
|
||||
bool JAConditionalSignalUpdateGAM::Compare(MARTe::uint32 index) {
|
||||
switch (comparators[index]) {
|
||||
case Equals:
|
||||
return *static_cast<T *>(inputSignals[index]) == static_cast<T>(expectedValues[index]);
|
||||
case Not:
|
||||
return *static_cast<T *>(inputSignals[index]) != static_cast<T>(expectedValues[index]);
|
||||
case Greater:
|
||||
return *static_cast<T *>(inputSignals[index]) > static_cast<T>(expectedValues[index]);
|
||||
case EqualsOrGreater:
|
||||
return *static_cast<T *>(inputSignals[index]) >= static_cast<T>(expectedValues[index]);
|
||||
case Less:
|
||||
return *static_cast<T *>(inputSignals[index]) < static_cast<T>(expectedValues[index]);
|
||||
default: // case EqualsOrLess:
|
||||
return *static_cast<T *>(inputSignals[index]) <= static_cast<T>(expectedValues[index]);
|
||||
}
|
||||
switch (comparators[index].comparator) {
|
||||
case Equals:
|
||||
return *(T*)(inputSignals[index]) == comparators[index].value;
|
||||
case Not:
|
||||
return *(T *)(inputSignals[index]) != comparators[index].value;
|
||||
case Greater:
|
||||
return *(T *)(inputSignals[index]) > comparators[index].value;
|
||||
case EqualsOrGreater:
|
||||
return *(T *)(inputSignals[index]) >= comparators[index].value;
|
||||
case Less:
|
||||
return *(T *)(inputSignals[index]) < comparators[index].value;
|
||||
default: // case EqualsOrLess:
|
||||
return *(T *)(inputSignals[index]) <= comparators[index].value;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* GAMS_JACONDITIONALSIGNALUPDATEGAM_H_ */
|
||||
|
||||
@@ -29,8 +29,12 @@
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "AdvancedErrorManagement.h"
|
||||
#include "Architecture/x86_gcc/CompilerTypes.h"
|
||||
#include "ErrorType.h"
|
||||
#include "JAMessageGAM.h"
|
||||
#include "MessageI.h"
|
||||
#include "StreamString.h"
|
||||
#include "TypeDescriptor.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Static definitions */
|
||||
@@ -40,308 +44,338 @@
|
||||
/* Method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class T, class U>
|
||||
bool Compare(JAMessageGAM::ComparisonMode comparator, void *inputSignal, U expectedValue) {
|
||||
switch (comparator) {
|
||||
case JAMessageGAM::Equals:
|
||||
return *static_cast<T *>(inputSignal) == expectedValue;
|
||||
case JAMessageGAM::Not:
|
||||
return *static_cast<T *>(inputSignal) != expectedValue;
|
||||
case JAMessageGAM::Greater:
|
||||
return *static_cast<T *>(inputSignal) > expectedValue;
|
||||
case JAMessageGAM::EqualsOrGreater:
|
||||
return *static_cast<T *>(inputSignal) >= expectedValue;
|
||||
case JAMessageGAM::Less:
|
||||
return *static_cast<T *>(inputSignal) < expectedValue;
|
||||
default: // case EqualsOrLess:
|
||||
return *static_cast<T *>(inputSignal) <= expectedValue;
|
||||
}
|
||||
template <class T, class U>
|
||||
bool Compare(JAMessageGAM::ComparisonMode comparator, void *inputSignal,
|
||||
U expectedValue) {
|
||||
switch (comparator) {
|
||||
case JAMessageGAM::Equals:
|
||||
return *static_cast<T *>(inputSignal) == expectedValue;
|
||||
case JAMessageGAM::Not:
|
||||
return *static_cast<T *>(inputSignal) != expectedValue;
|
||||
case JAMessageGAM::Greater:
|
||||
return *static_cast<T *>(inputSignal) > expectedValue;
|
||||
case JAMessageGAM::EqualsOrGreater:
|
||||
return *static_cast<T *>(inputSignal) >= expectedValue;
|
||||
case JAMessageGAM::Less:
|
||||
return *static_cast<T *>(inputSignal) < expectedValue;
|
||||
default: // case EqualsOrLess:
|
||||
return *static_cast<T *>(inputSignal) <= expectedValue;
|
||||
}
|
||||
}
|
||||
|
||||
bool parse_comparator(const MARTe::StreamString &str,
|
||||
JAMessageGAM::ComparisonMode &op) {
|
||||
if (str == "EQUALS") {
|
||||
op = JAMessageGAM::Equals;
|
||||
return true;
|
||||
}
|
||||
if (str == "NOT") {
|
||||
op = JAMessageGAM::Not;
|
||||
return true;
|
||||
}
|
||||
if (str == "GREATER") {
|
||||
op = JAMessageGAM::Greater;
|
||||
return true;
|
||||
}
|
||||
if (str == "EQUALS_OR_GREATER") {
|
||||
op = JAMessageGAM::EqualsOrGreater;
|
||||
return true;
|
||||
}
|
||||
if (str == "LESS") {
|
||||
op = JAMessageGAM::Less;
|
||||
return true;
|
||||
}
|
||||
if (str == "EQUALS_OR_LESS") {
|
||||
op = JAMessageGAM::EqualsOrLess;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_int(const MARTe::TypeDescriptor &td) {
|
||||
return (td == MARTe::UnsignedInteger32Bit) ||
|
||||
(td == MARTe::SignedInteger32Bit) ||
|
||||
(td == MARTe::UnsignedInteger16Bit) ||
|
||||
(td == MARTe::SignedInteger16Bit) ||
|
||||
(td == MARTe::UnsignedInteger8Bit) || (td == MARTe::SignedInteger8Bit);
|
||||
}
|
||||
|
||||
bool is_float(const MARTe::TypeDescriptor &td) {
|
||||
return (td == MARTe::Float32Bit) || (td == MARTe::Float64Bit);
|
||||
}
|
||||
|
||||
JAMessageGAM::JAMessageGAM() {
|
||||
inputSignals = NULL_PTR(void **);
|
||||
inputSignalTypes = NULL_PTR(MARTe::TypeDescriptor *);
|
||||
operation = And;
|
||||
needsReset = false;
|
||||
expectedValuesInt = NULL_PTR(MARTe::uint64 *);
|
||||
expectedValuesFloat = NULL_PTR(MARTe::float64 *);
|
||||
intValuesCount = 0u;
|
||||
floatValuesCount = 0u;
|
||||
comparators = NULL_PTR(ComparisonMode *);
|
||||
inputSignals = NULL_PTR(void **);
|
||||
inputSignalTypes = NULL_PTR(MARTe::TypeDescriptor *);
|
||||
comparators = NULL_PTR(comparator_t *);
|
||||
operation = And;
|
||||
needsReset = false;
|
||||
}
|
||||
|
||||
JAMessageGAM::~JAMessageGAM() {
|
||||
if (inputSignals != NULL_PTR(void **)) {
|
||||
delete[] inputSignals;
|
||||
}
|
||||
if (inputSignalTypes != NULL_PTR(MARTe::TypeDescriptor *)) {
|
||||
delete[] inputSignalTypes;
|
||||
}
|
||||
if (expectedValuesInt != NULL_PTR(MARTe::uint64 *)) {
|
||||
delete[] expectedValuesInt;
|
||||
}
|
||||
if (expectedValuesFloat != NULL_PTR(MARTe::float64 *)) {
|
||||
delete[] expectedValuesFloat;
|
||||
}
|
||||
if (comparators != NULL_PTR(ComparisonMode *)) {
|
||||
delete[] comparators;
|
||||
}
|
||||
if (inputSignals != NULL_PTR(void **)) {
|
||||
delete[] inputSignals;
|
||||
}
|
||||
if (inputSignalTypes != NULL_PTR(MARTe::TypeDescriptor *)) {
|
||||
delete[] inputSignalTypes;
|
||||
}
|
||||
if (comparators != NULL_PTR(comparator_t *)) {
|
||||
delete[] comparators;
|
||||
}
|
||||
}
|
||||
|
||||
bool JAMessageGAM::Initialise(MARTe::StructuredDataI & data) {
|
||||
using namespace MARTe;
|
||||
bool ok = GAM::Initialise(data);
|
||||
if (ok) {
|
||||
// Read expected integer values.
|
||||
AnyType valuesArray = data.GetType("ExpectedIntValues");
|
||||
bool intValuesProvided = (valuesArray.GetDataPointer() != NULL);
|
||||
|
||||
if (intValuesProvided) {
|
||||
intValuesCount = valuesArray.GetNumberOfElements(0u);
|
||||
}
|
||||
if (intValuesProvided) {
|
||||
expectedValuesInt = new uint64[intValuesCount];
|
||||
|
||||
Vector<uint64> valuesVector(expectedValuesInt, intValuesCount);
|
||||
ok = (data.Read("ExpectedIntValues", valuesVector));
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Failed to read ExpectedIntValues.");
|
||||
return ok;
|
||||
}
|
||||
}
|
||||
// Read expected float values.
|
||||
valuesArray = data.GetType("ExpectedFloatValues");
|
||||
bool floatValuesProvided = (valuesArray.GetDataPointer() != NULL);
|
||||
|
||||
if (floatValuesProvided) {
|
||||
floatValuesCount = valuesArray.GetNumberOfElements(0u);
|
||||
}
|
||||
if (floatValuesProvided) {
|
||||
expectedValuesFloat = new float64[floatValuesCount];
|
||||
|
||||
Vector<float64> valuesVector(expectedValuesFloat, floatValuesCount);
|
||||
ok = (data.Read("ExpectedFloatValues", valuesVector));
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Failed to read ExpectedFloatValues.");
|
||||
return ok;
|
||||
}
|
||||
}
|
||||
|
||||
ok = (floatValuesCount + intValuesCount) > 0u;
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "ExpectedFloatValues and or ExpectedIntValues shall be defined.");
|
||||
}
|
||||
bool JAMessageGAM::Initialise(MARTe::StructuredDataI &data) {
|
||||
using namespace MARTe;
|
||||
bool ok = GAM::Initialise(data);
|
||||
if (ok) {
|
||||
MARTe::StreamString operationStr;
|
||||
if (data.Read("Operation", operationStr)) {
|
||||
if (operationStr == "AND") {
|
||||
operation = And;
|
||||
} else if (operationStr == "OR") {
|
||||
operation = Or;
|
||||
} else if (operationStr == "NOR") {
|
||||
operation = Nor;
|
||||
} else if (operationStr == "XOR") {
|
||||
operation = Xor;
|
||||
} else {
|
||||
ok = false;
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Operation %s is not defined", operationStr.Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
ok = (Size() == 1);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"A Message object shall be added to this container");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
eventMsg = Get(0);
|
||||
ok = (eventMsg.IsValid());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"A valid Message shall be added to this container");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.MoveRelative("InputSignals");
|
||||
uint32 level = 0;
|
||||
if (ok) {
|
||||
// Read comparators.
|
||||
AnyType comparatorsArray = data.GetType("Comparators");
|
||||
if (comparatorsArray.GetDataPointer() != NULL) {
|
||||
uint32 count = comparatorsArray.GetNumberOfElements(0u);
|
||||
ok = count == (intValuesCount + floatValuesCount);
|
||||
if (ok) {
|
||||
comparators = new ComparisonMode[count];
|
||||
StreamString* comp = new StreamString[count];
|
||||
Vector<StreamString> compVector(comp, count);
|
||||
|
||||
ok = (data.Read("Comparators", compVector));
|
||||
|
||||
if (ok) {
|
||||
for (uint32 i = 0; i < count; ++i) {
|
||||
if (comp[i] == "EQUALS") {
|
||||
comparators[i] = Equals;
|
||||
} else if (comp[i] == "NOT") {
|
||||
comparators[i] = Not;
|
||||
} else if (comp[i] == "GREATER") {
|
||||
comparators[i] = Greater;
|
||||
} else if (comp[i] == "EQUALS_OR_GREATER") {
|
||||
comparators[i] = EqualsOrGreater;
|
||||
} else if (comp[i] == "LESS") {
|
||||
comparators[i] = Less;
|
||||
} else if (comp[i] == "EQUALS_OR_LESS") {
|
||||
comparators[i] = EqualsOrLess;
|
||||
} else {
|
||||
ok = false;
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Comparator %s is not defined.", comp[i].Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Expected values and operators shall have the same "
|
||||
"number of elements.");
|
||||
}
|
||||
level++;
|
||||
uint32 n_inputs = data.GetNumberOfChildren();
|
||||
comparators = new comparator_t[n_inputs];
|
||||
StreamString strbuffer;
|
||||
TypeDescriptor td;
|
||||
for (uint32 i = 0; ok && i < n_inputs; i++) {
|
||||
ok = data.MoveToChild(i);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Impossible to move to InputSignals[%lu]", i);
|
||||
break;
|
||||
}
|
||||
level++;
|
||||
strbuffer = "";
|
||||
ok = data.Read("Type", strbuffer);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Missing mandatory field Type from InputSignals[%lu]",
|
||||
i);
|
||||
break;
|
||||
}
|
||||
td = TypeDescriptor::GetTypeDescriptorFromTypeName(strbuffer.Buffer());
|
||||
ok = (td != InvalidType) && (is_float(td) || is_int(td));
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Wrong value for field Type from InputSignals[%lu]", i);
|
||||
break;
|
||||
}
|
||||
strbuffer = "";
|
||||
ok = data.Read("Comparator", strbuffer);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(
|
||||
ErrorManagement::ParametersError,
|
||||
"Missing mandatory field Comparator from InputSignals[%lu]", i);
|
||||
break;
|
||||
}
|
||||
ok = parse_comparator(strbuffer, comparators[i].comparator);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Non Valid Comparator `%s` from InputSignals[%lu]",
|
||||
strbuffer.Buffer(), i);
|
||||
break;
|
||||
}
|
||||
if (is_int(td)) {
|
||||
ok = data.Read("Value", comparators[i].value.i64);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(
|
||||
ErrorManagement::ParametersError,
|
||||
"Missing field Value (expecting int) from InputSignals[%lu]",
|
||||
i);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
uint32 count = intValuesCount + floatValuesCount;
|
||||
if (ok) {
|
||||
// Create default comparators (equals) when they aren't provided in the configuration.
|
||||
comparators = new ComparisonMode[count];
|
||||
for (uint32 i = 0; i < count; ++i) {
|
||||
comparators[i] = Equals;
|
||||
}
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Expected values and operators shall have the same "
|
||||
"number of elements.");
|
||||
}
|
||||
ok = data.Read("Value", comparators[i].value.f64);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(
|
||||
ErrorManagement::ParametersError,
|
||||
"Missing field Value (expecting float) from InputSignals[%lu]",
|
||||
i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
MARTe::StreamString operationStr;
|
||||
if (data.Read("Operation", operationStr)) {
|
||||
if (operationStr == "AND") {
|
||||
operation = And;
|
||||
}
|
||||
else if (operationStr == "OR") {
|
||||
operation = Or;
|
||||
}
|
||||
else if (operationStr == "NOR") {
|
||||
operation = Nor;
|
||||
}
|
||||
else if (operationStr == "XOR") {
|
||||
operation = Xor;
|
||||
}
|
||||
else {
|
||||
ok = false;
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Operation %s is not defined", operationStr.Buffer());
|
||||
}
|
||||
if (data.MoveToAncestor(1)) {
|
||||
level--;
|
||||
}
|
||||
}
|
||||
data.MoveToAncestor(level);
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Impossible to move to InputSignals");
|
||||
}
|
||||
if (ok) {
|
||||
ok = (Size() == 1);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "A Message object shall be added to this container");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
eventMsg = Get(0);
|
||||
ok = (eventMsg.IsValid());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "A valid Message shall be added to this container");
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAMessageGAM::Setup() {
|
||||
using namespace MARTe;
|
||||
bool ok = numberOfInputSignals == (intValuesCount + floatValuesCount);
|
||||
if (ok) {
|
||||
ok = numberOfInputSignals > 0u;
|
||||
if (ok) {
|
||||
inputSignals = new void*[numberOfInputSignals];
|
||||
uint32 i;
|
||||
for (i = 0u; i < numberOfInputSignals; i++) {
|
||||
inputSignals[i] = GetInputSignalMemory(i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "At least one input signal shall be defined");
|
||||
}
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Number of input signals shall be the same as "
|
||||
"number of expected values.");
|
||||
using namespace MARTe;
|
||||
bool ok = numberOfInputSignals > 0u;
|
||||
if (ok) {
|
||||
inputSignals = new void *[numberOfInputSignals];
|
||||
uint32 i;
|
||||
for (i = 0u; i < numberOfInputSignals; i++) {
|
||||
inputSignals[i] = GetInputSignalMemory(i);
|
||||
}
|
||||
if (ok) {
|
||||
inputSignalTypes = new TypeDescriptor[numberOfInputSignals];
|
||||
uint32 i;
|
||||
for (i = 0u; (i < numberOfInputSignals) && (ok); i++) {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, i);
|
||||
inputSignalTypes[i] = inputType;
|
||||
ok = (inputType == UnsignedInteger32Bit) || (inputType == SignedInteger32Bit) ||
|
||||
(inputType == UnsignedInteger16Bit) || (inputType == SignedInteger16Bit) ||
|
||||
(inputType == UnsignedInteger8Bit) || (inputType == SignedInteger8Bit) ||
|
||||
(inputType == Float64Bit) || (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
StreamString signalName;
|
||||
(void) GetSignalName(InputSignals, i, signalName);
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Signal %s shall be defined as 32/16/8 bit signed/unsigned integer "
|
||||
"or as 64/32 float.", signalName.Buffer());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"At least one input signal shall be defined");
|
||||
}
|
||||
if (ok) {
|
||||
inputSignalTypes = new TypeDescriptor[numberOfInputSignals];
|
||||
uint32 i;
|
||||
for (i = 0u; (i < numberOfInputSignals) && (ok); i++) {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, i);
|
||||
inputSignalTypes[i] = inputType;
|
||||
ok = (inputType == UnsignedInteger32Bit) ||
|
||||
(inputType == SignedInteger32Bit) ||
|
||||
(inputType == UnsignedInteger16Bit) ||
|
||||
(inputType == SignedInteger16Bit) ||
|
||||
(inputType == UnsignedInteger8Bit) ||
|
||||
(inputType == SignedInteger8Bit) || (inputType == Float64Bit) ||
|
||||
(inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
StreamString signalName;
|
||||
(void)GetSignalName(InputSignals, i, signalName);
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Signal %s shall be defined as 32/16/8 bit "
|
||||
"signed/unsigned integer "
|
||||
"or as 64/32 float.",
|
||||
signalName.Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAMessageGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
|
||||
needsReset = false;
|
||||
return true;
|
||||
bool JAMessageGAM::PrepareNextState(const MARTe::char8 *const currentStateName,
|
||||
const MARTe::char8 *const nextStateName) {
|
||||
needsReset = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool JAMessageGAM::Execute() {
|
||||
using namespace MARTe;
|
||||
bool ok = true;
|
||||
bool eventDetected = false;
|
||||
uint32 inputPortIndex = 0;
|
||||
uint32 intIndex = 0;
|
||||
uint32 floatIndex = 0;
|
||||
if (operation == Or) {
|
||||
for (inputPortIndex = 0; (inputPortIndex < numberOfInputSignals) && (!eventDetected); inputPortIndex++) {
|
||||
eventDetected = Compare(inputPortIndex, floatIndex, intIndex);
|
||||
}
|
||||
using namespace MARTe;
|
||||
bool ok = true;
|
||||
bool eventDetected = false;
|
||||
uint32 inputPortIndex = 0;
|
||||
uint32 intIndex = 0;
|
||||
uint32 floatIndex = 0;
|
||||
if (operation == Or) {
|
||||
for (inputPortIndex = 0;
|
||||
(inputPortIndex < numberOfInputSignals) && (!eventDetected);
|
||||
inputPortIndex++) {
|
||||
eventDetected = Compare(inputPortIndex, floatIndex, intIndex);
|
||||
}
|
||||
else if (operation == Nor) {
|
||||
for (inputPortIndex = 0; (inputPortIndex < numberOfInputSignals) && (!eventDetected); inputPortIndex++) {
|
||||
eventDetected = Compare(inputPortIndex, floatIndex, intIndex);
|
||||
}
|
||||
eventDetected = !eventDetected;
|
||||
} else if (operation == Nor) {
|
||||
for (inputPortIndex = 0;
|
||||
(inputPortIndex < numberOfInputSignals) && (!eventDetected);
|
||||
inputPortIndex++) {
|
||||
eventDetected = Compare(inputPortIndex, floatIndex, intIndex);
|
||||
}
|
||||
else if (operation == And) {
|
||||
eventDetected = Compare(0, floatIndex, intIndex);
|
||||
for (inputPortIndex = 1; (inputPortIndex < numberOfInputSignals); inputPortIndex++) {
|
||||
eventDetected &= Compare(inputPortIndex, floatIndex, intIndex);
|
||||
}
|
||||
eventDetected = !eventDetected;
|
||||
} else if (operation == And) {
|
||||
eventDetected = Compare(0, floatIndex, intIndex);
|
||||
for (inputPortIndex = 1; (inputPortIndex < numberOfInputSignals);
|
||||
inputPortIndex++) {
|
||||
eventDetected &= Compare(inputPortIndex, floatIndex, intIndex);
|
||||
}
|
||||
else if (operation == Xor) {
|
||||
uint32 eventDetectedUInt32 = Compare(inputPortIndex, floatIndex, intIndex);
|
||||
for (inputPortIndex = 1; (inputPortIndex < numberOfInputSignals); inputPortIndex++) {
|
||||
eventDetectedUInt32 ^= Compare(inputPortIndex, floatIndex, intIndex);
|
||||
}
|
||||
eventDetected = (eventDetectedUInt32 == 1u);
|
||||
} else if (operation == Xor) {
|
||||
uint32 eventDetectedUInt32 = Compare(inputPortIndex, floatIndex, intIndex);
|
||||
for (inputPortIndex = 1; (inputPortIndex < numberOfInputSignals);
|
||||
inputPortIndex++) {
|
||||
eventDetectedUInt32 ^= Compare(inputPortIndex, floatIndex, intIndex);
|
||||
}
|
||||
if (eventDetected) {
|
||||
if (!needsReset) {
|
||||
ok = (MessageI::SendMessage(eventMsg, this) == ErrorManagement::NoError);
|
||||
needsReset = true;
|
||||
}
|
||||
eventDetected = (eventDetectedUInt32 == 1u);
|
||||
}
|
||||
if (eventDetected) {
|
||||
if (!needsReset) {
|
||||
ok = (MessageI::SendMessage(eventMsg, this) == ErrorManagement::NoError);
|
||||
needsReset = true;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAMessageGAM::Compare(MARTe::uint32 inputPortIndex, MARTe::uint32 &floatValueIndex, MARTe::uint32 &intValueIndex) {
|
||||
using namespace MARTe;
|
||||
bool ret = false;
|
||||
if (inputSignalTypes[inputPortIndex] == UnsignedInteger32Bit) {
|
||||
ret = ::Compare<uint32>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
|
||||
++intValueIndex;
|
||||
}
|
||||
else if (inputSignalTypes[inputPortIndex] == SignedInteger32Bit) {
|
||||
ret = ::Compare<int32>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
|
||||
++intValueIndex;
|
||||
}
|
||||
else if (inputSignalTypes[inputPortIndex] == UnsignedInteger16Bit) {
|
||||
ret = ::Compare<uint16>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
|
||||
++intValueIndex;
|
||||
}
|
||||
else if (inputSignalTypes[inputPortIndex] == SignedInteger16Bit) {
|
||||
ret = ::Compare<int16>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
|
||||
++intValueIndex;
|
||||
}
|
||||
else if (inputSignalTypes[inputPortIndex] == UnsignedInteger8Bit) {
|
||||
ret = ::Compare<uint8>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
|
||||
++intValueIndex;
|
||||
}
|
||||
else if (inputSignalTypes[inputPortIndex] == SignedInteger8Bit) {
|
||||
ret = ::Compare<int8>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
|
||||
++intValueIndex;
|
||||
}
|
||||
else if (inputSignalTypes[inputPortIndex] == Float64Bit) {
|
||||
ret = ::Compare<float64>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesFloat[floatValueIndex]);
|
||||
++floatValueIndex;
|
||||
}
|
||||
else {
|
||||
ret = ::Compare<float32>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesFloat[floatValueIndex]);
|
||||
++floatValueIndex;
|
||||
}
|
||||
return ret;
|
||||
bool JAMessageGAM::Compare(MARTe::uint32 inputPortIndex,
|
||||
MARTe::uint32 &floatValueIndex,
|
||||
MARTe::uint32 &intValueIndex) {
|
||||
using namespace MARTe;
|
||||
bool ret = false;
|
||||
if (inputSignalTypes[inputPortIndex] == UnsignedInteger32Bit) {
|
||||
ret = ::Compare<uint32>(comparators[inputPortIndex].comparator,
|
||||
inputSignals[inputPortIndex],
|
||||
comparators[inputPortIndex].value.i64);
|
||||
++intValueIndex;
|
||||
} else if (inputSignalTypes[inputPortIndex] == SignedInteger32Bit) {
|
||||
ret = ::Compare<int32>(comparators[inputPortIndex].comparator,
|
||||
inputSignals[inputPortIndex],
|
||||
comparators[inputPortIndex].value.i64);
|
||||
++intValueIndex;
|
||||
} else if (inputSignalTypes[inputPortIndex] == UnsignedInteger16Bit) {
|
||||
ret = ::Compare<uint16>(comparators[inputPortIndex].comparator,
|
||||
inputSignals[inputPortIndex],
|
||||
comparators[inputPortIndex].value.i64);
|
||||
++intValueIndex;
|
||||
} else if (inputSignalTypes[inputPortIndex] == SignedInteger16Bit) {
|
||||
ret = ::Compare<int16>(comparators[inputPortIndex].comparator,
|
||||
inputSignals[inputPortIndex],
|
||||
comparators[inputPortIndex].value.i64);
|
||||
++intValueIndex;
|
||||
} else if (inputSignalTypes[inputPortIndex] == UnsignedInteger8Bit) {
|
||||
ret = ::Compare<uint8>(comparators[inputPortIndex].comparator,
|
||||
inputSignals[inputPortIndex],
|
||||
comparators[inputPortIndex].value.i64);
|
||||
++intValueIndex;
|
||||
} else if (inputSignalTypes[inputPortIndex] == SignedInteger8Bit) {
|
||||
ret = ::Compare<int8>(comparators[inputPortIndex].comparator,
|
||||
inputSignals[inputPortIndex],
|
||||
comparators[inputPortIndex].value.i64);
|
||||
++intValueIndex;
|
||||
} else if (inputSignalTypes[inputPortIndex] == Float64Bit) {
|
||||
ret = ::Compare<float64>(comparators[inputPortIndex].comparator,
|
||||
inputSignals[inputPortIndex],
|
||||
comparators[inputPortIndex].value.f64);
|
||||
++floatValueIndex;
|
||||
} else {
|
||||
ret = ::Compare<float32>(comparators[inputPortIndex].comparator,
|
||||
inputSignals[inputPortIndex],
|
||||
comparators[inputPortIndex].value.f64);
|
||||
++floatValueIndex;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
CLASS_REGISTER(JAMessageGAM, "1.0")
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Architecture/x86_gcc/CompilerTypes.h"
|
||||
#include "GAM.h"
|
||||
#include "Message.h"
|
||||
|
||||
@@ -48,22 +49,23 @@
|
||||
* +MessageGAM = {
|
||||
* Class = JAMessageGAM
|
||||
* Operation = AND // Accepted values are: AND, OR, XOR, NOR. Default value is AND.
|
||||
* ExpectedIntValues = {1 10} // Expected values for input signals of integral type.
|
||||
* ExpectedFloatValues = {3.5} // Expected values for float signals of floting point type.
|
||||
* Comparators = {EQUALS GREATER NOT} // Accepted values are: EQUALS, NOT, GREATER, EQUALS_OR_GREATER, LESS, EQUALS_OR_LESS
|
||||
* // Comparators element is optional. Default comparator is EQUALS.
|
||||
* InputSignals = {
|
||||
* Sig1 = {
|
||||
* DataSource = EPICSCAInput
|
||||
* Type = uint32
|
||||
* Comparator = "EQUALS" | "GREATER" | "NOT" | "EQUALS_OR_GREATER" | "LESS" | "EQUALS_OR_LESS"
|
||||
* ExpectedValue = 1
|
||||
* }
|
||||
* Sig2 = {
|
||||
* DataSource = EPICSCAInput
|
||||
* Type = float32
|
||||
* Comparator = "EQUALS" | "GREATER" | "NOT" | "EQUALS_OR_GREATER" | "LESS" | "EQUALS_OR_LESS"
|
||||
* ExpectedValue = 3.5
|
||||
* }
|
||||
* Sig3 = {
|
||||
* DataSource = EPICSCAInput
|
||||
* Type = uint32
|
||||
* Comparator = "EQUALS" | "GREATER" | "NOT" | "EQUALS_OR_GREATER" | "LESS" | "EQUALS_OR_LESS"
|
||||
* }
|
||||
* }
|
||||
* +Event = { // Message to be sent when condition is true.
|
||||
@@ -113,6 +115,17 @@ private:
|
||||
// Input signals
|
||||
void **inputSignals;
|
||||
|
||||
struct comparator_t {
|
||||
ComparisonMode comparator;
|
||||
union {
|
||||
MARTe::int64 i64;
|
||||
MARTe::float64 f64;
|
||||
} value;
|
||||
};
|
||||
comparator_t * comparators;
|
||||
|
||||
|
||||
|
||||
MARTe::TypeDescriptor *inputSignalTypes;
|
||||
|
||||
// Condition operation.
|
||||
@@ -123,21 +136,6 @@ private:
|
||||
|
||||
// Was the message already sent and we are waiting for a state change before next message can be sent.
|
||||
bool needsReset;
|
||||
|
||||
// Array of expected integer values of input signals.
|
||||
MARTe::uint64* expectedValuesInt;
|
||||
|
||||
// Array of expected float values for input signals.
|
||||
MARTe::float64* expectedValuesFloat;
|
||||
|
||||
// Expected integer values count (must be equal to numberOfInputSignals - floatValuesCount)
|
||||
MARTe::uint32 intValuesCount;
|
||||
|
||||
// Expected integer values count (must be equal to numberOfInputSignals - floatValuesCount)
|
||||
MARTe::uint32 floatValuesCount;
|
||||
|
||||
// Array of comparators
|
||||
ComparisonMode* comparators;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ bool JAModeControlGAM::Execute() {
|
||||
rfonTime = *inputSignals[9];
|
||||
resetRemainingTime = false;
|
||||
pulseLengthLimit = CalcPulseLengthLimit(inputSignals);
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "Pulse Length was set to Limit:%d", pulseLengthLimit);
|
||||
REPORT_ERROR(ErrorManagement::Debug, "Pulse Length was set to Limit:%d", pulseLengthLimit);
|
||||
}
|
||||
// Turn on the flag during RFON if the pulse legth over the limit.
|
||||
if ((*inputSignals[9] - rfonTime <= pulseLengthLimit) && (previousState == 1u)) {
|
||||
|
||||
@@ -53,7 +53,7 @@ JAPreProgrammedGAM::JAPreProgrammedGAM() :
|
||||
timeSignal = NULL_PTR(MARTe::int32 *);
|
||||
loadTriggerSignal = NULL_PTR(MARTe::uint32 *);
|
||||
fhpsrefSignal = NULL_PTR(MARTe::float32 *);
|
||||
rfonStateSignal = NULL_PTR(MARTe::uint32 *);
|
||||
rfonStateSignal = NULL_PTR(MARTe::uint8 *);
|
||||
|
||||
valueSignals = NULL_PTR(MARTe::float32 **);
|
||||
preProgrammedValues = NULL_PTR(MARTe::float32 **);
|
||||
@@ -178,13 +178,13 @@ bool JAPreProgrammedGAM::Setup() {
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, rfonIndex);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
ok = (inputType == UnsignedInteger8Bit);
|
||||
if (!ok) {
|
||||
StreamString signalName;
|
||||
(void) GetSignalName(InputSignals, rfonIndex, signalName);
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as float32", signalName.Buffer());
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as uint8", signalName.Buffer());
|
||||
} else {
|
||||
rfonStateSignal = reinterpret_cast<uint32 *>(GetInputSignalMemory(rfonIndex));
|
||||
rfonStateSignal = reinterpret_cast<uint8 *>(GetInputSignalMemory(rfonIndex));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ private:
|
||||
MARTe::uint32 *loadTriggerSignal; //index:0
|
||||
MARTe::uint32 filenameSignalIndex;//index:1
|
||||
MARTe::float32 *fhpsrefSignal; //index:2
|
||||
MARTe::uint32 *rfonStateSignal; //index:3
|
||||
MARTe::uint8 *rfonStateSignal; //index:3
|
||||
|
||||
//Output Signals
|
||||
MARTe::int32 *timeSignal; //index:0
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "JARTStateMachineGAM.h"
|
||||
|
||||
#include "AdvancedErrorManagement.h"
|
||||
#include "TypeDescriptor.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Static definitions */
|
||||
@@ -57,7 +58,7 @@ JARTStateMachineGAM::JARTStateMachineGAM() {
|
||||
mhvps_hvon = 0;
|
||||
|
||||
// Parameters which get from Input signals.
|
||||
triggerSignal = NULL_PTR(MARTe::uint32 *);
|
||||
triggerSignal = NULL_PTR(MARTe::uint8 *);
|
||||
currentTime = NULL_PTR(MARTe::uint32 *);
|
||||
turn_off_delay = 2000; //us
|
||||
|
||||
@@ -68,18 +69,18 @@ JARTStateMachineGAM::JARTStateMachineGAM() {
|
||||
triggerDelay_bps_swon = NULL_PTR(MARTe::uint32 *);
|
||||
triggerDelay_shotlen = NULL_PTR(MARTe::uint32 *);
|
||||
|
||||
stopRequest = NULL_PTR(MARTe::uint32 *);
|
||||
stopRequest = NULL_PTR(MARTe::uint8 *);
|
||||
modePulseLengthLimit = NULL_PTR(MARTe::uint32 *);
|
||||
short_pulse_mode = NULL_PTR(MARTe::uint32 *);
|
||||
|
||||
modulation = NULL_PTR(MARTe::uint32 *);
|
||||
modulation = NULL_PTR(MARTe::uint8 *);
|
||||
|
||||
// write out target.
|
||||
outputSignal = NULL_PTR(MARTe::uint32 *);
|
||||
outputBeamON = NULL_PTR(MARTe::uint32 *);
|
||||
outputHVArmed = NULL_PTR(MARTe::uint32 *);
|
||||
outputHVInjection = NULL_PTR(MARTe::uint32 *);
|
||||
outputRFON = NULL_PTR(MARTe::uint32 *);
|
||||
outputBeamON = NULL_PTR(MARTe::uint8 *);
|
||||
outputHVArmed = NULL_PTR(MARTe::uint8*);
|
||||
outputHVInjection = NULL_PTR(MARTe::uint8 *);
|
||||
outputRFON = NULL_PTR(MARTe::uint8 *);
|
||||
outputBeamONTime = NULL_PTR(MARTe::uint32 *);
|
||||
outputRFONTime = NULL_PTR(MARTe::uint32 *);
|
||||
shotCounter = NULL_PTR(MARTe::uint32 *);
|
||||
@@ -153,9 +154,9 @@ bool JARTStateMachineGAM::Setup() {
|
||||
using namespace MARTe;
|
||||
bool ok = (numberOfInputSignals == 13u);
|
||||
if (ok) {
|
||||
ok = (numberOfOutputSignals == 16u);
|
||||
ok = (numberOfOutputSignals == 14u);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Seven output signals shall be defined %d",numberOfOutputSignals);
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "14 output signals shall be defined %d",numberOfOutputSignals);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -165,7 +166,7 @@ bool JARTStateMachineGAM::Setup() {
|
||||
uint32 c;
|
||||
for (c = 0u; c < numberOfInputSignals; c++) {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, c);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
ok = (inputType == UnsignedInteger32Bit || inputType == UnsignedInteger8Bit);
|
||||
if (!ok) {
|
||||
StreamString signalName;
|
||||
(void) GetSignalName(InputSignals, c, signalName);
|
||||
@@ -181,45 +182,43 @@ bool JARTStateMachineGAM::Setup() {
|
||||
ok = (outputType == UnsignedInteger32Bit || outputType == UnsignedInteger8Bit);
|
||||
if (!ok) {
|
||||
StreamString signalName;
|
||||
(void) GetSignalName(InputSignals, c, signalName);
|
||||
(void) GetSignalName(OutputSignals, c, signalName);
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as uint32", signalName.Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
currentTime = reinterpret_cast<uint32 *>(GetInputSignalMemory(0));
|
||||
triggerSignal = reinterpret_cast<uint32 *>(GetInputSignalMemory(1));
|
||||
triggerSignal = reinterpret_cast<uint8 *>(GetInputSignalMemory(1));
|
||||
triggerDelay_mhvps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(2));
|
||||
triggerDelay_aps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(3));
|
||||
triggerDelay_aps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(4));
|
||||
triggerDelay_bps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(5));
|
||||
triggerDelay_bps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(6));
|
||||
triggerDelay_shotlen = reinterpret_cast<uint32 *>(GetInputSignalMemory(7));
|
||||
stopRequest = reinterpret_cast<uint32 *>(GetInputSignalMemory(8));
|
||||
stopRequest = reinterpret_cast<uint8 *>(GetInputSignalMemory(8));
|
||||
modePulseLengthLimit = reinterpret_cast<uint32 *>(GetInputSignalMemory(9));
|
||||
short_pulse_mode = reinterpret_cast<uint32 *>(GetInputSignalMemory(10));
|
||||
modulation = reinterpret_cast<uint32 *>(GetInputSignalMemory(11));
|
||||
pauseSet = reinterpret_cast<uint32 *>(GetInputSignalMemory(12));
|
||||
modulation = reinterpret_cast<uint8 *>(GetInputSignalMemory(11));
|
||||
pauseSet = reinterpret_cast<uint8 *>(GetInputSignalMemory(12));
|
||||
|
||||
|
||||
outputSignal = reinterpret_cast<uint32 *>(GetOutputSignalMemory(0));
|
||||
outputBeamON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(1));
|
||||
outputHVArmed = reinterpret_cast<uint32 *>(GetOutputSignalMemory(2));
|
||||
outputHVInjection = reinterpret_cast<uint32 *>(GetOutputSignalMemory(3));
|
||||
outputRFON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(4));
|
||||
outputBeamON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(1));
|
||||
outputHVArmed = reinterpret_cast<uint8 *>(GetOutputSignalMemory(2));
|
||||
outputHVInjection = reinterpret_cast<uint8 *>(GetOutputSignalMemory(3));
|
||||
outputRFON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(4));
|
||||
outputBeamONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(5));
|
||||
outputRFONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(6));
|
||||
shotCounter = reinterpret_cast<uint32 *>(GetOutputSignalMemory(7));
|
||||
|
||||
outputAPSHVON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(8));
|
||||
outputAPSSWON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(9));
|
||||
outputBPSHVON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(10));
|
||||
outputBPSSWON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(11));
|
||||
outputMHVPSON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(12));
|
||||
outputAPSHVON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(8));
|
||||
outputAPSSWON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(9));
|
||||
outputBPSHVON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(10));
|
||||
outputBPSSWON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(11));
|
||||
outputMHVPSON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(12));
|
||||
|
||||
outputSignalNI6259 = reinterpret_cast<uint32 *>(GetOutputSignalMemory(13));
|
||||
outputSignalNI6528P3 = reinterpret_cast<uint8 *>(GetOutputSignalMemory(14));
|
||||
outputSignalNI6528P4 = reinterpret_cast<uint8 *>(GetOutputSignalMemory(15));
|
||||
|
||||
*shotCounter = 0;
|
||||
}
|
||||
@@ -389,20 +388,9 @@ bool JARTStateMachineGAM::Execute() {
|
||||
}
|
||||
}
|
||||
if(*short_pulse_mode == 1){
|
||||
p3Value = 1*aps_hvon_state + 8*bps_hvon_state +16*bps_swon_state + 64*(*outputBeamON);
|
||||
*outputSignalNI6259 = 1*aps_swon_state;
|
||||
*outputSignalNI6528P3 = ~p3Value;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "short pulse mode with p3: %d.", p3Value);
|
||||
} else {
|
||||
p3Value = 1*aps_hvon_state +2*aps_swon_state + 8*bps_hvon_state +16*bps_swon_state + 64*(*outputBeamON);
|
||||
*outputSignalNI6528P3 = ~p3Value;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "long pulse mode with p3: %d.", p3Value);
|
||||
p3Value = aps_hvon_state + 8*bps_hvon_state +16*bps_swon_state + 64*(*outputBeamON);
|
||||
*outputSignalNI6259 = aps_swon_state;
|
||||
}
|
||||
p4Value = 8*mhvps_hvon_state;
|
||||
if (modulation) p4Value += 32;
|
||||
if (pauseSet) p4Value += 1;
|
||||
//*outputSignalNI6528P4 = ~(*ni6528p4Value | p4Value);
|
||||
*outputSignalNI6528P4 = ~p4Value;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Architecture/x86_gcc/CompilerTypes.h"
|
||||
#include "GAM.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
@@ -174,7 +175,7 @@ private:
|
||||
MARTe::uint32 bps_swon;
|
||||
|
||||
//The trigger signal (PLC_ON)
|
||||
MARTe::uint32 *triggerSignal;
|
||||
MARTe::uint8 *triggerSignal;
|
||||
|
||||
//Time signal
|
||||
MARTe::uint32 *currentTime;
|
||||
@@ -188,24 +189,24 @@ private:
|
||||
MARTe::uint32 *triggerDelay_shotlen;
|
||||
|
||||
// Input signal for sequence stop request.
|
||||
MARTe::uint32 *stopRequest;
|
||||
MARTe::uint8 *stopRequest;
|
||||
// Input signal for pulse length limit by mode.
|
||||
MARTe::uint32 *modePulseLengthLimit;
|
||||
// Input signal for short pulse mode.
|
||||
MARTe::uint32 *short_pulse_mode;
|
||||
// Input signal for modulation pv.
|
||||
MARTe::uint32 *modulation;
|
||||
MARTe::uint8 *modulation;
|
||||
// Input signal for pause signal set pv.
|
||||
MARTe::uint32 *pauseSet;
|
||||
MARTe::uint8 *pauseSet;
|
||||
|
||||
// Output signal to which the output value will be written.
|
||||
// One state write One signal.
|
||||
MARTe::uint32 *outputSignal;
|
||||
// state notify output
|
||||
MARTe::uint32 *outputBeamON;
|
||||
MARTe::uint32 *outputHVArmed;
|
||||
MARTe::uint32 *outputHVInjection;
|
||||
MARTe::uint32 *outputRFON;
|
||||
MARTe::uint8 *outputBeamON;
|
||||
MARTe::uint8 *outputHVArmed;
|
||||
MARTe::uint8 *outputHVInjection;
|
||||
MARTe::uint8 *outputRFON;
|
||||
// elapsed time notify output;
|
||||
MARTe::uint32 *outputBeamONTime;
|
||||
MARTe::uint32 *outputRFONTime;
|
||||
@@ -213,16 +214,14 @@ private:
|
||||
MARTe::uint32 *shotCounter;
|
||||
|
||||
// Added for HVPS state (20201117)
|
||||
MARTe::uint32 *outputAPSHVON;
|
||||
MARTe::uint32 *outputAPSSWON;
|
||||
MARTe::uint32 *outputBPSHVON;
|
||||
MARTe::uint32 *outputBPSSWON;
|
||||
MARTe::uint32 *outputMHVPSON;
|
||||
MARTe::uint8 *outputAPSHVON;
|
||||
MARTe::uint8 *outputAPSSWON;
|
||||
MARTe::uint8 *outputBPSHVON;
|
||||
MARTe::uint8 *outputBPSSWON;
|
||||
MARTe::uint8 *outputMHVPSON;
|
||||
|
||||
// Output signals for NI devices
|
||||
MARTe::uint32 *outputSignalNI6259;
|
||||
MARTe::uint8 *outputSignalNI6528P3;
|
||||
MARTe::uint8 *outputSignalNI6528P4;
|
||||
|
||||
//////////////////////////////
|
||||
//Internal Parameters
|
||||
@@ -246,7 +245,6 @@ private:
|
||||
|
||||
// terminal values
|
||||
MARTe::uint8 p3Value;
|
||||
MARTe::uint8 p4Value;
|
||||
MARTe::uint8 aps_hvon_state;
|
||||
MARTe::uint8 aps_swon_state;
|
||||
MARTe::uint8 mhvps_hvon_state;
|
||||
|
||||
@@ -41,255 +41,253 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
JARampupGAM::JARampupGAM() : GAM() {
|
||||
current_setpoint = NULL_PTR(MARTe::float32 *);
|
||||
target_value = NULL_PTR(MARTe::float32 *);
|
||||
rampup_time = NULL_PTR(MARTe::float32 *);
|
||||
start = NULL_PTR(MARTe::uint32 *);
|
||||
standby = NULL_PTR(MARTe::uint32 *);
|
||||
isAuto = NULL_PTR(MARTe::uint32 *);
|
||||
FHPS_PrePro = NULL_PTR(MARTe::float32 *);
|
||||
target_value = NULL_PTR(MARTe::float32 *);
|
||||
rampup_time = NULL_PTR(MARTe::float32 *);
|
||||
start = NULL_PTR(MARTe::uint32 *);
|
||||
standby = NULL_PTR(MARTe::uint8 *);
|
||||
isAuto = NULL_PTR(MARTe::uint32 *);
|
||||
FHPS_PrePro = NULL_PTR(MARTe::float32 *);
|
||||
|
||||
output = NULL_PTR(MARTe::float32 *);
|
||||
state = NULL_PTR(MARTe::uint32 *);
|
||||
output = NULL_PTR(MARTe::float32 *);
|
||||
state = NULL_PTR(MARTe::uint32 *);
|
||||
|
||||
rampup_rate = 0.0f;
|
||||
inRampup = false;
|
||||
resetFlag = true;
|
||||
inWaitHVON = false;
|
||||
inWaitStandby = false;
|
||||
rampup_rate = 0.0f;
|
||||
inRampup = false;
|
||||
resetFlag = true;
|
||||
inWaitHVON = false;
|
||||
inWaitStandby = false;
|
||||
}
|
||||
|
||||
JARampupGAM::~JARampupGAM() {
|
||||
}
|
||||
JARampupGAM::~JARampupGAM() {}
|
||||
|
||||
bool JARampupGAM::Initialise(MARTe::StructuredDataI & data) {
|
||||
using namespace MARTe;
|
||||
return GAM::Initialise(data);
|
||||
bool JARampupGAM::Initialise(MARTe::StructuredDataI &data) {
|
||||
using namespace MARTe;
|
||||
return GAM::Initialise(data);
|
||||
}
|
||||
|
||||
bool JARampupGAM::Setup() {
|
||||
using namespace MARTe;
|
||||
bool ok = (numberOfInputSignals == 7u);
|
||||
if (ok) {
|
||||
ok = (numberOfOutputSignals == 2u);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Two output signals shall be defined.");
|
||||
}
|
||||
using namespace MARTe;
|
||||
bool ok = (numberOfInputSignals == 6u);
|
||||
if (ok) {
|
||||
ok = (numberOfOutputSignals == 2u);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Two output signals shall be defined.");
|
||||
}
|
||||
else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Six input signals shall be defined.");
|
||||
}
|
||||
uint32 currentspvIndex;
|
||||
uint32 targetvIndex;
|
||||
uint32 timeIndex;
|
||||
uint32 startIndex;
|
||||
uint32 standbyIndex;
|
||||
uint32 isAutoIndex;
|
||||
uint32 fhpsPreProIndex;
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Six input signals shall be defined.");
|
||||
}
|
||||
uint32 currentspvIndex;
|
||||
uint32 targetvIndex;
|
||||
uint32 timeIndex;
|
||||
uint32 startIndex;
|
||||
uint32 standbyIndex;
|
||||
uint32 isAutoIndex;
|
||||
uint32 fhpsPreProIndex;
|
||||
|
||||
if (ok) {
|
||||
StreamString signalName = "Currspv";
|
||||
ok = GetSignalIndex(InputSignals, currentspvIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Currspv input signal shall be defined.");
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, currentspvIndex);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Signal Currspv shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "Targetv";
|
||||
ok = GetSignalIndex(InputSignals, targetvIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Targetv input signal shall be defined.");
|
||||
} else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, targetvIndex);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Signal Targetv shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "Targetv";
|
||||
ok = GetSignalIndex(InputSignals, targetvIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Targetv input signal shall be defined.");
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, targetvIndex);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Signal Targetv shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "Time";
|
||||
ok = GetSignalIndex(InputSignals, timeIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Time input signal shall be defined.");
|
||||
} else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, timeIndex);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Signal Time shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "Time";
|
||||
ok = GetSignalIndex(InputSignals, timeIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Time input signal shall be defined.");
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, timeIndex);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Signal Time shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "Start";
|
||||
ok = GetSignalIndex(InputSignals, startIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Start input signal shall be defined.");
|
||||
} else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, startIndex);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Start shall be defined as uint32.");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "Start";
|
||||
ok = GetSignalIndex(InputSignals, startIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Start input signal shall be defined.");
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, startIndex);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Start shall be defined as uint32.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "PLC_STANDBY";
|
||||
ok = GetSignalIndex(InputSignals, standbyIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"PLC_STANDBY input signal shall be defined.");
|
||||
} else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, standbyIndex);
|
||||
ok = (inputType == UnsignedInteger8Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"PLC_STANDBY shall be defined as uint8.");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "PLC_STANDBY";
|
||||
ok = GetSignalIndex(InputSignals, standbyIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "PLC_STANDBY input signal shall be defined.");
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, standbyIndex);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "PLC_STANDBY shall be defined as uint32.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "MANUAL_AUTO";
|
||||
ok = GetSignalIndex(InputSignals, isAutoIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"MANUAL_AUTO input signal shall be defined.");
|
||||
} else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, isAutoIndex);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"MANUAL_AUTO shall be defined as uint32.");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "MANUAL_AUTO";
|
||||
ok = GetSignalIndex(InputSignals, isAutoIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "MANUAL_AUTO input signal shall be defined.");
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, isAutoIndex);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "MANUAL_AUTO shall be defined as uint32.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "FHPS_PrePro";
|
||||
ok = GetSignalIndex(InputSignals, fhpsPreProIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "FHPS_PrePro input signal shall be defined.");
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, fhpsPreProIndex);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Signal FHPS_PrePro shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
StreamString signalName = "FHPS_PrePro";
|
||||
ok = GetSignalIndex(InputSignals, fhpsPreProIndex, signalName.Buffer());
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"FHPS_PrePro input signal shall be defined.");
|
||||
} else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, fhpsPreProIndex);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Signal FHPS_PrePro shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
TypeDescriptor inputType = GetSignalType(OutputSignals, 0);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Signal Output shall be defined as float32.");
|
||||
}
|
||||
if (ok) {
|
||||
TypeDescriptor inputType = GetSignalType(OutputSignals, 0);
|
||||
ok = (inputType == Float32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Signal Output shall be defined as float32.");
|
||||
}
|
||||
if (ok) {
|
||||
TypeDescriptor inputType = GetSignalType(OutputSignals, 1);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Signal state shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
TypeDescriptor inputType = GetSignalType(OutputSignals, 1);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Signal state shall be defined as float32.");
|
||||
}
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
current_setpoint = reinterpret_cast<float32 *>(GetInputSignalMemory(currentspvIndex));
|
||||
target_value = reinterpret_cast<float32 *>(GetInputSignalMemory(targetvIndex));
|
||||
rampup_time = reinterpret_cast<float32 *>(GetInputSignalMemory(timeIndex));
|
||||
start = reinterpret_cast<uint32 *>(GetInputSignalMemory(startIndex));
|
||||
standby = reinterpret_cast<uint32 *>(GetInputSignalMemory(standbyIndex));
|
||||
isAuto = reinterpret_cast<uint32 *>(GetInputSignalMemory(isAutoIndex));
|
||||
FHPS_PrePro = reinterpret_cast<float32 *>(GetInputSignalMemory(fhpsPreProIndex));
|
||||
if (ok) {
|
||||
target_value =
|
||||
reinterpret_cast<float32 *>(GetInputSignalMemory(targetvIndex));
|
||||
rampup_time = reinterpret_cast<float32 *>(GetInputSignalMemory(timeIndex));
|
||||
start = reinterpret_cast<uint32 *>(GetInputSignalMemory(startIndex));
|
||||
standby = reinterpret_cast<uint8 *>(GetInputSignalMemory(standbyIndex));
|
||||
isAuto = reinterpret_cast<uint32 *>(GetInputSignalMemory(isAutoIndex));
|
||||
FHPS_PrePro =
|
||||
reinterpret_cast<float32 *>(GetInputSignalMemory(fhpsPreProIndex));
|
||||
|
||||
output = reinterpret_cast<float32 *>(GetOutputSignalMemory(0));
|
||||
state = reinterpret_cast<uint32 *>(GetOutputSignalMemory(1));
|
||||
}
|
||||
return ok;
|
||||
output = reinterpret_cast<float32 *>(GetOutputSignalMemory(0));
|
||||
state = reinterpret_cast<uint32 *>(GetOutputSignalMemory(1));
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JARampupGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName){
|
||||
if(strcmp(nextStateName, "WaitHVON_PREP")==0 || strcmp(nextStateName, "WaitHVON_SDN_PREP")==0 ||
|
||||
strcmp(nextStateName, "WaitHVON")==0 || strcmp(nextStateName, "WaitHVON_SDN")==0){
|
||||
inWaitHVON = true;
|
||||
inWaitStandby = false;
|
||||
} else{
|
||||
inWaitHVON = false;
|
||||
if(strcmp(nextStateName,"WaitStandby")==0 ){
|
||||
inWaitStandby = true;
|
||||
} else {
|
||||
inWaitStandby = false;
|
||||
}
|
||||
bool JARampupGAM::PrepareNextState(const MARTe::char8 *const currentStateName,
|
||||
const MARTe::char8 *const nextStateName) {
|
||||
if (strcmp(nextStateName, "WaitHVON_PREP") == 0 ||
|
||||
strcmp(nextStateName, "WaitHVON_SDN_PREP") == 0 ||
|
||||
strcmp(nextStateName, "WaitHVON") == 0 ||
|
||||
strcmp(nextStateName, "WaitHVON_SDN") == 0) {
|
||||
inWaitHVON = true;
|
||||
inWaitStandby = false;
|
||||
} else {
|
||||
inWaitHVON = false;
|
||||
if (strcmp(nextStateName, "WaitStandby") == 0) {
|
||||
inWaitStandby = true;
|
||||
} else {
|
||||
inWaitStandby = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool JARampupGAM::Execute() {
|
||||
using namespace MARTe;
|
||||
if(!inWaitHVON){
|
||||
if (*target_value <= 0.0f || *standby == 0u) {
|
||||
*output = 0.0f;
|
||||
rampup_rate = 0.0f;
|
||||
if(*target_value <= 0.0f){
|
||||
*state = 3u;
|
||||
} else {
|
||||
*state = 0u;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if(*start == 1u && *isAuto==0u){ //isAuto = 1.Manual, 0.auto-rampup.
|
||||
inRampup = true;
|
||||
resetFlag = true;
|
||||
*output = 0.0f; //Enable if it should start always zero.
|
||||
}
|
||||
|
||||
// Calcrate new rampup rate.
|
||||
if(*rampup_time != 0 && resetFlag == true){
|
||||
rampup_rate = (*target_value - *current_setpoint) / *rampup_time/1000.0f; // Volt/msec
|
||||
resetFlag = false;
|
||||
}
|
||||
|
||||
// Update Parameter
|
||||
if(*standby == 1u ){
|
||||
if(*isAuto == 1u){
|
||||
if (inWaitStandby){
|
||||
*output = *target_value;
|
||||
} else{
|
||||
*output = *FHPS_PrePro;
|
||||
}
|
||||
//*output = *target_value;
|
||||
*state = 0u;
|
||||
return true;
|
||||
}
|
||||
else if (inRampup){
|
||||
if (*output + rampup_rate < *target_value && *rampup_time != 0){
|
||||
*output = *output + rampup_rate;
|
||||
*state = 1u;
|
||||
} else {
|
||||
*output = *target_value;
|
||||
*state = 2u;
|
||||
inRampup = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
if(*isAuto == 0){
|
||||
*output = *FHPS_PrePro;
|
||||
} else{
|
||||
*output = *target_value;
|
||||
}
|
||||
return true;
|
||||
using namespace MARTe;
|
||||
float32 current_setpoint = *output;
|
||||
if (!inWaitHVON) {
|
||||
if (*target_value <= 0.0f || *standby == 0u) {
|
||||
*output = 0.0f;
|
||||
rampup_rate = 0.0f;
|
||||
if (*target_value <= 0.0f) {
|
||||
*state = 3u;
|
||||
} else {
|
||||
*state = 0u;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*start == 1u && *isAuto == 0u) { // isAuto = 1.Manual, 0.auto-rampup.
|
||||
inRampup = true;
|
||||
resetFlag = true;
|
||||
*output = 0.0f; // Enable if it should start always zero.
|
||||
}
|
||||
|
||||
// Calcrate new rampup rate.
|
||||
if (*rampup_time != 0 && resetFlag == true) {
|
||||
rampup_rate = (*target_value - current_setpoint) / *rampup_time /
|
||||
1000.0f; // Volt/msec
|
||||
resetFlag = false;
|
||||
}
|
||||
|
||||
// Update Parameter
|
||||
if (*standby == 1u) {
|
||||
if (*isAuto == 1u) {
|
||||
if (inWaitStandby) {
|
||||
*output = *target_value;
|
||||
} else {
|
||||
*output = *FHPS_PrePro;
|
||||
}
|
||||
//*output = *target_value;
|
||||
*state = 0u;
|
||||
return true;
|
||||
} else if (inRampup) {
|
||||
if (*output + rampup_rate < *target_value && *rampup_time != 0) {
|
||||
*output = *output + rampup_rate;
|
||||
*state = 1u;
|
||||
} else {
|
||||
*output = *target_value;
|
||||
*state = 2u;
|
||||
inRampup = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
if (*isAuto == 0) {
|
||||
*output = *FHPS_PrePro;
|
||||
} else {
|
||||
*output = *target_value;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
CLASS_REGISTER(JARampupGAM, "1.0")
|
||||
|
||||
@@ -97,8 +97,6 @@ public:
|
||||
const MARTe::char8 * const nextStateName);
|
||||
|
||||
private:
|
||||
// Input signal containing current current_setpoint
|
||||
MARTe::float32 *current_setpoint;
|
||||
|
||||
// Input signal containing the frequency of the waveform.
|
||||
MARTe::float32 *target_value;
|
||||
@@ -110,7 +108,7 @@ private:
|
||||
MARTe::uint32 *start;
|
||||
|
||||
// Input signal PLC_STANDBY
|
||||
MARTe::uint32 *standby;
|
||||
MARTe::uint8 *standby;
|
||||
|
||||
// MANUAL AUTO button
|
||||
MARTe::uint32 *isAuto;
|
||||
|
||||
@@ -32,14 +32,12 @@
|
||||
#include "JASDNRTStateMachineGAM.h"
|
||||
|
||||
#include "AdvancedErrorManagement.h"
|
||||
#include "TypeDescriptor.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Static definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static MARTe::uint64 getCurrentTimeUs() {
|
||||
using namespace MARTe;
|
||||
return static_cast<uint64>(HighResolutionTimer::Counter() * HighResolutionTimer::Period() * 1e6f + 0.5f);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
@@ -57,7 +55,7 @@ JASDNRTStateMachineGAM::JASDNRTStateMachineGAM() {
|
||||
mhvps_hvon = 0;
|
||||
|
||||
// Parameters which get from Input signals.
|
||||
triggerSignal = NULL_PTR(MARTe::uint32 *);
|
||||
triggerSignal = NULL_PTR(MARTe::uint8 *);
|
||||
currentTime = NULL_PTR(MARTe::uint32 *);
|
||||
triggerDelay_mhvps_hvon = NULL_PTR(MARTe::uint32 *);
|
||||
triggerDelay_aps_hvon = NULL_PTR(MARTe::uint32 *);
|
||||
@@ -65,18 +63,16 @@ JASDNRTStateMachineGAM::JASDNRTStateMachineGAM() {
|
||||
triggerDelay_bps_hvon = NULL_PTR(MARTe::uint32 *);
|
||||
triggerDelay_bps_swon = NULL_PTR(MARTe::uint32 *);
|
||||
triggerDelay_shotlen = NULL_PTR(MARTe::uint32 *);
|
||||
stopRequest = NULL_PTR(MARTe::uint32 *);
|
||||
stopRequest = NULL_PTR(MARTe::uint8 *);
|
||||
modePulseLengthLimit = NULL_PTR(MARTe::uint32 *);
|
||||
Command = NULL_PTR(MARTe::uint16 *);
|
||||
Command2 = NULL_PTR(MARTe::uint16 *);
|
||||
sdnStatus = NULL_PTR(MARTe::uint8 *);
|
||||
sdnCommand = NULL_PTR(MARTe::uint16 *);
|
||||
|
||||
// write out target.
|
||||
outputSignal = NULL_PTR(MARTe::uint32 *);
|
||||
outputBeamON = NULL_PTR(MARTe::uint32 *);
|
||||
outputHVArmed = NULL_PTR(MARTe::uint32 *);
|
||||
outputHVInjection = NULL_PTR(MARTe::uint32 *);
|
||||
outputRFON = NULL_PTR(MARTe::uint32 *);
|
||||
outputBeamON = NULL_PTR(MARTe::uint8 *);
|
||||
outputHVArmed = NULL_PTR(MARTe::uint8 *);
|
||||
outputHVInjection = NULL_PTR(MARTe::uint8 *);
|
||||
outputRFON = NULL_PTR(MARTe::uint8 *);
|
||||
outputBeamONTime = NULL_PTR(MARTe::uint32 *);
|
||||
outputRFONTime = NULL_PTR(MARTe::uint32 *);
|
||||
shotCounter = NULL_PTR(MARTe::uint32 *);
|
||||
@@ -86,17 +82,6 @@ JASDNRTStateMachineGAM::JASDNRTStateMachineGAM() {
|
||||
aps_swon_is_on = false;
|
||||
bps_hvon_is_on = false;
|
||||
bps_swon_is_on = false;
|
||||
|
||||
sdnCommand = 0;
|
||||
groupFix = 0;
|
||||
|
||||
apsSwonHighResolutionTime = 0;
|
||||
|
||||
aps_hvon_state=0;
|
||||
aps_swon_state=0;
|
||||
mhvps_hvon_state=0;
|
||||
bps_hvon_state=0;
|
||||
bps_swon_state=0;
|
||||
}
|
||||
|
||||
JASDNRTStateMachineGAM::~JASDNRTStateMachineGAM() {
|
||||
@@ -151,15 +136,15 @@ bool JASDNRTStateMachineGAM::PrepareNextState(const MARTe::char8 * const current
|
||||
|
||||
bool JASDNRTStateMachineGAM::Setup() {
|
||||
using namespace MARTe;
|
||||
bool ok = (numberOfInputSignals == 13u);
|
||||
bool ok = (numberOfInputSignals == 11u);
|
||||
if (ok) {
|
||||
ok = (numberOfOutputSignals == 15u);
|
||||
ok = (numberOfOutputSignals == 8u);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "15 output signals shall be defined");
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Seven output signals shall be defined");
|
||||
}
|
||||
}
|
||||
else {
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "13 input signals shall be defined");
|
||||
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Nine input signals shall be defined");
|
||||
}
|
||||
if (ok) {
|
||||
uint32 c;
|
||||
@@ -188,36 +173,25 @@ bool JASDNRTStateMachineGAM::Setup() {
|
||||
}
|
||||
if (ok) {
|
||||
currentTime = reinterpret_cast<uint32 *>(GetInputSignalMemory(0));
|
||||
triggerSignal = reinterpret_cast<uint32 *>(GetInputSignalMemory(1));
|
||||
triggerSignal = reinterpret_cast<uint8 *>(GetInputSignalMemory(1));
|
||||
triggerDelay_mhvps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(2));
|
||||
triggerDelay_aps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(3));
|
||||
triggerDelay_aps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(4));
|
||||
triggerDelay_bps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(5));
|
||||
triggerDelay_bps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(6));
|
||||
triggerDelay_shotlen = reinterpret_cast<uint32 *>(GetInputSignalMemory(7));
|
||||
stopRequest = reinterpret_cast<uint32 *>(GetInputSignalMemory(8));
|
||||
stopRequest = reinterpret_cast<uint8 *>(GetInputSignalMemory(8));
|
||||
modePulseLengthLimit = reinterpret_cast<uint32 *>(GetInputSignalMemory(9));
|
||||
Command = reinterpret_cast<uint16 *>(GetInputSignalMemory(10));
|
||||
Command2 = reinterpret_cast<uint16 *>(GetInputSignalMemory(11));
|
||||
sdnStatus = reinterpret_cast<uint8 *>(GetInputSignalMemory(12));
|
||||
sdnCommand = reinterpret_cast<uint16 *>(GetInputSignalMemory(10));
|
||||
|
||||
outputSignal = reinterpret_cast<uint32 *>(GetOutputSignalMemory(0));
|
||||
outputBeamON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(1));
|
||||
outputHVArmed = reinterpret_cast<uint32 *>(GetOutputSignalMemory(2));
|
||||
outputHVInjection = reinterpret_cast<uint32 *>(GetOutputSignalMemory(3));
|
||||
outputRFON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(4));
|
||||
outputBeamON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(1));
|
||||
outputHVArmed = reinterpret_cast<uint8 *>(GetOutputSignalMemory(2));
|
||||
outputHVInjection = reinterpret_cast<uint8 *>(GetOutputSignalMemory(3));
|
||||
outputRFON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(4));
|
||||
outputBeamONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(5));
|
||||
outputRFONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(6));
|
||||
shotCounter = reinterpret_cast<uint32 *>(GetOutputSignalMemory(7));
|
||||
|
||||
outputAPSHVON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(8));
|
||||
outputAPSSWON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(9));
|
||||
outputBPSHVON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(10));
|
||||
outputBPSSWON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(11));
|
||||
outputMHVPSON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(12));
|
||||
|
||||
outputSignalNI6528P3 = reinterpret_cast<uint8 *>(GetOutputSignalMemory(13));
|
||||
outputSignalNI6528P4 = reinterpret_cast<uint8 *>(GetOutputSignalMemory(14));
|
||||
*shotCounter = 0;
|
||||
}
|
||||
return ok;
|
||||
@@ -225,19 +199,11 @@ bool JASDNRTStateMachineGAM::Setup() {
|
||||
|
||||
bool JASDNRTStateMachineGAM::Execute() {
|
||||
using namespace MARTe;
|
||||
if (!groupFix && (*triggerSignal != false)) {
|
||||
sdnCommand = (1 - *sdnStatus)*(*Command) + (*sdnStatus)*(*Command2);
|
||||
groupFix = 1;
|
||||
sdnStatusFix = *sdnStatus;
|
||||
}
|
||||
else {
|
||||
sdnCommand = (1 - sdnStatusFix)*(*Command) + sdnStatusFix*(*Command2);
|
||||
}
|
||||
if (currentState == WaitTrigger) {
|
||||
|
||||
//State Transition condition
|
||||
if ((*triggerSignal == conditionTrigger)) {
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "Start beam-on sequence in SDN mode.");
|
||||
REPORT_ERROR(ErrorManagement::Debug, "Start beam-on sequence in SDN mode.");
|
||||
plcOnTime = *currentTime; //Save pulse start time.
|
||||
*outputBeamON = 0;
|
||||
//State transition.
|
||||
@@ -248,22 +214,20 @@ bool JASDNRTStateMachineGAM::Execute() {
|
||||
|
||||
//Actions in this state.
|
||||
if (*stopRequest != 0 || *triggerSignal != conditionTrigger) {
|
||||
*outputSignal = 0;
|
||||
*outputSignal -= aps_swon;
|
||||
currentState = HVTerminate;
|
||||
}
|
||||
if (*currentTime >= (plcOnTime + *triggerDelay_bps_hvon) && bps_hvon_is_on == false){
|
||||
//Do action
|
||||
*outputSignal += bps_hvon;
|
||||
bps_hvon_is_on = true; bps_hvon_state=1;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "bps_hvon was set to outputSignal at %d.", *currentTime);
|
||||
*outputBPSHVON=1;
|
||||
bps_hvon_is_on = true;
|
||||
REPORT_ERROR(ErrorManagement::Debug, "bps_hvon was set to outputSignal at %d.", *currentTime);
|
||||
}
|
||||
if (*currentTime >= (plcOnTime + *triggerDelay_aps_hvon) && aps_hvon_is_on == false) {
|
||||
//Do action
|
||||
*outputSignal += aps_hvon;
|
||||
aps_hvon_is_on = true; aps_hvon_state=1;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "aps_hvon was set to outputSignal.");
|
||||
*outputAPSHVON=1;
|
||||
aps_hvon_is_on = true;
|
||||
REPORT_ERROR(ErrorManagement::Debug, "aps_hvon was set to outputSignal.");
|
||||
}
|
||||
|
||||
*outputBeamONTime = *currentTime - plcOnTime; //Save RFON start time.
|
||||
@@ -279,7 +243,7 @@ bool JASDNRTStateMachineGAM::Execute() {
|
||||
*outputBeamONTime = *currentTime - plcOnTime; //Save RFON start time.
|
||||
|
||||
// State change conditions
|
||||
if (sdnCommand == 1){
|
||||
if (*sdnCommand == 1){
|
||||
sdnTriggerTime = *currentTime;
|
||||
currentState = SwitchingHVPS_SWON;
|
||||
}
|
||||
@@ -299,80 +263,68 @@ bool JASDNRTStateMachineGAM::Execute() {
|
||||
if (*currentTime >= (sdnTriggerTime + *triggerDelay_bps_swon) && bps_swon_is_on==false){
|
||||
//Do action
|
||||
*outputSignal += bps_swon;
|
||||
bps_swon_is_on = true; bps_swon_state=1;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "bps_swon was set to outputSignal at %d.", *currentTime);
|
||||
*outputBPSSWON=1;
|
||||
bps_swon_is_on = true;
|
||||
REPORT_ERROR(ErrorManagement::Debug, "bps_swon was set to outputSignal at %d.", *currentTime);
|
||||
}
|
||||
if (*currentTime >= (sdnTriggerTime + *triggerDelay_mhvps_hvon) && mhvps_hvon_is_on==false) {
|
||||
//Do action
|
||||
*outputSignal += mhvps_hvon;
|
||||
mhvps_hvon_is_on = true; mhvps_hvon_state=1;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "mhvps_hvon was set to outputSignal at %d.", *currentTime);
|
||||
*outputMHVPSON=1;
|
||||
mhvps_hvon_is_on = true;
|
||||
REPORT_ERROR(ErrorManagement::Debug, "mhvps_hvon was set to outputSignal at %d.", *currentTime);
|
||||
}
|
||||
if (bps_swon_is_on && mhvps_hvon_is_on && *currentTime >= (sdnTriggerTime + *triggerDelay_aps_swon)){
|
||||
//Do action
|
||||
*outputSignal += aps_swon;
|
||||
aps_swon_is_on = true; aps_swon_state=1;
|
||||
apsSwonHighResolutionTime = getCurrentTimeUs();
|
||||
aps_swon_is_on = true;
|
||||
apsSwonTime = *currentTime;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "aps_swon was set to outputSignal at %d.", *currentTime);
|
||||
*outputAPSSWON=1;
|
||||
REPORT_ERROR(ErrorManagement::Debug, "aps_swon was set to outputSignal at %d.", *currentTime);
|
||||
}
|
||||
*outputBeamONTime = *currentTime - plcOnTime; //Save RFON start time.
|
||||
|
||||
if (bps_swon_is_on || mhvps_hvon_is_on){
|
||||
*outputHVInjection = 1;
|
||||
*outputHVInjection = 0;
|
||||
}
|
||||
|
||||
//State transition condition
|
||||
if (aps_swon_is_on){
|
||||
currentState = RFON;
|
||||
*outputRFON = 0;
|
||||
*outputBeamON = 1;
|
||||
*shotCounter += 1;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "state was changed to RFON");
|
||||
REPORT_ERROR(ErrorManagement::Debug, "state was changed to RFON");
|
||||
}
|
||||
}
|
||||
else if (currentState == RFON) {
|
||||
|
||||
//SDN command processing.
|
||||
if (sdnCommand == 4 && aps_swon_is_on) {
|
||||
if (*sdnCommand == 4 && aps_swon_is_on) {
|
||||
*outputSignal -= aps_swon;
|
||||
aps_swon_is_on = false; aps_swon_state=0;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "sdn command was 4");
|
||||
*outputAPSSWON=0;
|
||||
aps_swon_is_on = false;
|
||||
REPORT_ERROR(ErrorManagement::Debug, "sdn command was 4");
|
||||
}
|
||||
if (sdnCommand == 3 && !aps_swon_is_on) {
|
||||
if (*sdnCommand == 3 && !aps_swon_is_on) {
|
||||
*outputSignal += aps_swon;
|
||||
aps_swon_is_on = true; aps_swon_state=0;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "sdn command was 3");
|
||||
*outputAPSSWON=1;
|
||||
aps_swon_is_on = true;
|
||||
REPORT_ERROR(ErrorManagement::Debug, "sdn command was 3");
|
||||
}
|
||||
|
||||
//Action in this state.
|
||||
if ((sdnCommand == 2) || (*modePulseLengthLimit == 1u) || (*currentTime >= (sdnTriggerTime + *triggerDelay_aps_swon + *triggerDelay_shotlen))) {
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "shotlen: %d", *triggerDelay_shotlen);
|
||||
if (sdnCommand == 2) {
|
||||
//REPORT_ERROR(ErrorManagement::Information, "sdn command was 2");
|
||||
if ((*sdnCommand == 2) || (*modePulseLengthLimit == 1u) || (*currentTime >= (sdnTriggerTime + *triggerDelay_aps_swon + *triggerDelay_shotlen))) {
|
||||
REPORT_ERROR(ErrorManagement::Debug, "shotlen: %d", *triggerDelay_shotlen);
|
||||
if (*sdnCommand == 2) {
|
||||
REPORT_ERROR(ErrorManagement::Information, "sdn command was 2");
|
||||
} else if (*currentTime >= (sdnTriggerTime + *triggerDelay_aps_swon + *triggerDelay_shotlen)){
|
||||
//REPORT_ERROR(ErrorManagement::Information, "pulse length reached setpoint.");
|
||||
REPORT_ERROR(ErrorManagement::Information, "pulse length reached setpoint.");
|
||||
}
|
||||
//Do action
|
||||
*outputSignal -= aps_swon; //Turn off only aps_swon
|
||||
mhvps_hvon_is_on = false;
|
||||
aps_hvon_is_on = false;
|
||||
aps_swon_is_on = false; aps_swon_state=0;
|
||||
aps_swon_is_on = false;
|
||||
bps_hvon_is_on = false;
|
||||
bps_swon_is_on = false;
|
||||
*outputAPSHVON=0;
|
||||
*outputAPSSWON=0;
|
||||
*outputBPSHVON=0;
|
||||
*outputBPSSWON=0;
|
||||
*outputMHVPSON=0;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "0 was set to outputSignal at %d.", *currentTime);
|
||||
REPORT_ERROR(ErrorManagement::Debug, "0 was set to outputSignal at %d.", *currentTime);
|
||||
}
|
||||
*outputRFON = 1;
|
||||
*outputRFON = 0;
|
||||
*outputBeamONTime = *currentTime - plcOnTime;
|
||||
*outputRFONTime = *currentTime - apsSwonTime;
|
||||
|
||||
@@ -381,37 +333,29 @@ bool JASDNRTStateMachineGAM::Execute() {
|
||||
if (!aps_swon_is_on && !bps_swon_is_on && !mhvps_hvon_is_on) {
|
||||
currentState = HVTerminate;
|
||||
apsSwoffTime = *currentTime;
|
||||
//REPORT_ERROR(ErrorManagement::Information, "state was changed to HVTerminate");
|
||||
REPORT_ERROR(ErrorManagement::Information, "state was changed to HVTerminate");
|
||||
}
|
||||
}
|
||||
else if (currentState == HVTerminate) {
|
||||
|
||||
//Action in this state.
|
||||
*outputBeamON = 0;
|
||||
*outputHVArmed = 0;
|
||||
*outputHVInjection = 0;
|
||||
*outputRFON = 0;
|
||||
*outputBeamON = 1;
|
||||
*outputHVArmed = 1;
|
||||
*outputHVInjection = 1;
|
||||
*outputRFON = 1;
|
||||
|
||||
// State transition condition.
|
||||
if (*currentTime - apsSwoffTime >= turn_off_delay){
|
||||
*outputSignal = 0;
|
||||
mhvps_hvon_state=0;
|
||||
aps_hvon_state=0;
|
||||
bps_hvon_state=0;
|
||||
bps_swon_state=0;
|
||||
}
|
||||
if (*triggerSignal == false){
|
||||
//Check PLC_ON is reset
|
||||
currentState = WaitTrigger;
|
||||
*outputSignal = 0;
|
||||
groupFix = 0;
|
||||
//REPORT_ERROR(ErrorManagement::Debug, "state was changed to WaitTrigger");
|
||||
REPORT_ERROR(ErrorManagement::Debug, "state was changed to WaitTrigger");
|
||||
}
|
||||
}
|
||||
p3Value = 1*aps_hvon_state +2*aps_swon_state + 8*bps_hvon_state +16*bps_swon_state + 64*(*outputBeamON);
|
||||
*outputSignalNI6528P3 = ~p3Value;
|
||||
p4Value = 8*mhvps_hvon_state;
|
||||
*outputSignalNI6528P4 = ~p4Value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* 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 JARTStateMachineGAM
|
||||
* @details This header file contains the declaration of the class
|
||||
JARTStateMachineGAM
|
||||
* 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.
|
||||
*/
|
||||
@@ -41,13 +42,9 @@
|
||||
/**
|
||||
* @brief GAM provides real-time state machine that communicate with SDN packet.
|
||||
*
|
||||
* The configuration syntax is (names and signal quantity are only given as an example):
|
||||
* <pre>
|
||||
* +GAMSDNRealTimeStateMachine = {
|
||||
* Class = JASDNRTStateMachineGAM
|
||||
* ConditionTrigger = 1
|
||||
* mhvps_hvon = 4
|
||||
* aps_hvon = 1
|
||||
* The configuration syntax is (names and signal quantity are only given as an
|
||||
* example): <pre> +GAMSDNRealTimeStateMachine = { Class =
|
||||
* JASDNRTStateMachineGAM ConditionTrigger = 1 mhvps_hvon = 4 aps_hvon = 1
|
||||
* aps_swon = 16
|
||||
* bps_hvon = 2
|
||||
* bps_swon = 8
|
||||
@@ -92,18 +89,10 @@
|
||||
* DataSource = DDB1
|
||||
* Type = uint32
|
||||
* }
|
||||
* Command = {//from packet x
|
||||
* Command = {
|
||||
* DataSource = RealTimeThreadAsyncBridge
|
||||
* Type = uint16
|
||||
* }
|
||||
* Command2 = {//from packet y
|
||||
* DataSource = RealTimeThreadAsyncBridge
|
||||
* Type = uint16
|
||||
* }
|
||||
* ESDNStatus = {// 0 or 1. If 0, packet x is used, elif 1, packet y is used.
|
||||
* DataSource = RealTimeThreadAsyncBridge
|
||||
* Type = uint8
|
||||
* }
|
||||
* }
|
||||
* OutputSignals = {
|
||||
* Value = {
|
||||
@@ -148,141 +137,106 @@
|
||||
|
||||
class JASDNRTStateMachineGAM : public MARTe::GAM, public MARTe::StatefulI {
|
||||
public:
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
|
||||
JASDNRTStateMachineGAM();
|
||||
JASDNRTStateMachineGAM();
|
||||
|
||||
virtual ~JASDNRTStateMachineGAM();
|
||||
virtual ~JASDNRTStateMachineGAM();
|
||||
|
||||
virtual bool Initialise(MARTe::StructuredDataI & data);
|
||||
virtual bool Initialise(MARTe::StructuredDataI &data);
|
||||
|
||||
virtual bool Setup();
|
||||
virtual bool Setup();
|
||||
|
||||
virtual bool Execute();
|
||||
virtual bool Execute();
|
||||
|
||||
virtual bool PrepareNextState(const MARTe::char8 * const currentStateName,
|
||||
const MARTe::char8 * const nextStateName);
|
||||
virtual bool PrepareNextState(const MARTe::char8 *const currentStateName,
|
||||
const MARTe::char8 *const nextStateName);
|
||||
|
||||
private:
|
||||
//The list of possible states
|
||||
enum JARealTimeState {
|
||||
WaitTrigger = 0,
|
||||
SwitchingHVPS_HVON = 1,
|
||||
WaitSDNTrigger = 2,
|
||||
SwitchingHVPS_SWON = 3,
|
||||
RFON = 4,
|
||||
HVTerminate = 5
|
||||
};
|
||||
// The list of possible states
|
||||
enum JARealTimeState {
|
||||
WaitTrigger = 0,
|
||||
SwitchingHVPS_HVON = 1,
|
||||
WaitSDNTrigger = 2,
|
||||
SwitchingHVPS_SWON = 3,
|
||||
RFON = 4,
|
||||
HVTerminate = 5
|
||||
};
|
||||
|
||||
//The current rtState
|
||||
JARealTimeState currentState;
|
||||
// The current rtState
|
||||
JARealTimeState currentState;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Static parameter given by cfg File
|
||||
/////////////////////////////////////////////////
|
||||
//A given condition
|
||||
MARTe::uint32 conditionTrigger;
|
||||
//What to output in a given state and condition
|
||||
MARTe::uint32 mhvps_hvon;
|
||||
MARTe::uint32 aps_hvon;
|
||||
MARTe::uint32 aps_swon;
|
||||
MARTe::uint32 bps_hvon;
|
||||
MARTe::uint32 bps_swon;
|
||||
/////////////////////////////////////////////////
|
||||
// Static parameter given by cfg File
|
||||
/////////////////////////////////////////////////
|
||||
// A given condition
|
||||
MARTe::uint32 conditionTrigger;
|
||||
// What to output in a given state and condition
|
||||
MARTe::uint32 mhvps_hvon;
|
||||
MARTe::uint32 aps_hvon;
|
||||
MARTe::uint32 aps_swon;
|
||||
MARTe::uint32 bps_hvon;
|
||||
MARTe::uint32 bps_swon;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Input signals
|
||||
/////////////////////////////////////////////////
|
||||
//The trigger signal (PLC_ON)
|
||||
MARTe::uint32 *triggerSignal;
|
||||
//Time signal (Time from TimerGAM)
|
||||
MARTe::uint32 *currentTime;
|
||||
// Input signals for trigger delay parameters
|
||||
MARTe::uint32 *triggerDelay_mhvps_hvon;
|
||||
MARTe::uint32 *triggerDelay_aps_hvon;
|
||||
MARTe::uint32 *triggerDelay_aps_swon;
|
||||
MARTe::uint32 *triggerDelay_bps_hvon;
|
||||
MARTe::uint32 *triggerDelay_bps_swon;
|
||||
MARTe::uint32 *triggerDelay_shotlen;
|
||||
// Input signal for sequence stop request.
|
||||
MARTe::uint32 *stopRequest;
|
||||
// Input signal for pulse length limit by mode.
|
||||
MARTe::uint32 *modePulseLengthLimit;
|
||||
// Input signal for SDN commands from packet x.
|
||||
MARTe::uint16 *Command;
|
||||
// Input signal for SDN commands from packet y.
|
||||
MARTe::uint16 *Command2;
|
||||
// Input signal for SDN status.
|
||||
MARTe::uint8 *sdnStatus;
|
||||
/////////////////////////////////////////////////
|
||||
// Input signals
|
||||
/////////////////////////////////////////////////
|
||||
// The trigger signal (PLC_ON)
|
||||
MARTe::uint8 *triggerSignal;
|
||||
// Time signal (Time from TimerGAM)
|
||||
MARTe::uint32 *currentTime;
|
||||
// Input signals for trigger delay parameters
|
||||
MARTe::uint32 *triggerDelay_mhvps_hvon;
|
||||
MARTe::uint32 *triggerDelay_aps_hvon;
|
||||
MARTe::uint32 *triggerDelay_aps_swon;
|
||||
MARTe::uint32 *triggerDelay_bps_hvon;
|
||||
MARTe::uint32 *triggerDelay_bps_swon;
|
||||
MARTe::uint32 *triggerDelay_shotlen;
|
||||
// Input signal for sequence stop request.
|
||||
MARTe::uint8 *stopRequest;
|
||||
// Input signal for pulse length limit by mode.
|
||||
MARTe::uint32 *modePulseLengthLimit;
|
||||
// Input signal for SDN commands.
|
||||
MARTe::uint16 *sdnCommand;
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// Output signal to which the output value will be written.
|
||||
/////////////////////////////////////////////////////////////
|
||||
// One state write One signal.
|
||||
MARTe::uint32 *outputSignal;
|
||||
// state notify output
|
||||
MARTe::uint32 *outputBeamON;
|
||||
MARTe::uint32 *outputHVArmed;
|
||||
MARTe::uint32 *outputHVInjection;
|
||||
MARTe::uint32 *outputRFON;
|
||||
// elapsed time notify output;
|
||||
MARTe::uint32 *outputBeamONTime;
|
||||
MARTe::uint32 *outputRFONTime;
|
||||
// shot counter (coutup every RFON time.)
|
||||
MARTe::uint32 *shotCounter;
|
||||
/////////////////////////////////////////////////////////////
|
||||
// Output signal to which the output value will be written.
|
||||
/////////////////////////////////////////////////////////////
|
||||
// One state write One signal.
|
||||
MARTe::uint32 *outputSignal;
|
||||
// state notify output
|
||||
MARTe::uint8 *outputBeamON;
|
||||
MARTe::uint8 *outputHVArmed;
|
||||
MARTe::uint8 *outputHVInjection;
|
||||
MARTe::uint8 *outputRFON;
|
||||
// elapsed time notify output;
|
||||
MARTe::uint32 *outputBeamONTime;
|
||||
MARTe::uint32 *outputRFONTime;
|
||||
// shot counter (coutup every RFON time.)
|
||||
MARTe::uint32 *shotCounter;
|
||||
|
||||
// Added for HVPS state (20210602)
|
||||
MARTe::uint32 *outputAPSHVON;
|
||||
MARTe::uint32 *outputAPSSWON;
|
||||
MARTe::uint32 *outputBPSHVON;
|
||||
MARTe::uint32 *outputBPSSWON;
|
||||
MARTe::uint32 *outputMHVPSON;
|
||||
//////////////////////////////
|
||||
// Internal Parameters
|
||||
//////////////////////////////
|
||||
// PLC_ON time holder
|
||||
MARTe::uint32 plcOnTime;
|
||||
// APS_SWON time holder
|
||||
MARTe::uint32 apsSwonTime;
|
||||
MARTe::uint32 apsSwoffTime;
|
||||
|
||||
// Output signals for NI devices
|
||||
MARTe::uint8 *outputSignalNI6528P3;
|
||||
MARTe::uint8 *outputSignalNI6528P4;
|
||||
|
||||
//////////////////////////////
|
||||
//Internal Parameters
|
||||
//////////////////////////////
|
||||
//PLC_ON time holder
|
||||
MARTe::uint32 plcOnTime;
|
||||
//APS_SWON time holder
|
||||
MARTe::uint32 apsSwonTime;
|
||||
MARTe::uint32 apsSwoffTime;
|
||||
MARTe::uint64 apsSwonHighResolutionTime;
|
||||
|
||||
//PS turn off delay
|
||||
MARTe::uint32 turn_off_delay;
|
||||
|
||||
//SDN trigger command arrival time.
|
||||
MARTe::uint32 sdnTriggerTime;
|
||||
//HVPS state holder
|
||||
bool mhvps_hvon_is_on;
|
||||
bool aps_hvon_is_on;
|
||||
bool aps_swon_is_on;
|
||||
bool bps_hvon_is_on;
|
||||
bool bps_swon_is_on;
|
||||
|
||||
//command x or y
|
||||
MARTe::uint16 sdnCommand;
|
||||
//packet group must not be changed during real time operation
|
||||
MARTe::uint16 groupFix; //0: packet group is not fixed yet, 1: fixed.
|
||||
//when packet group is fixed, sdnStatus is copied to this variable.
|
||||
MARTe::uint8 sdnStatusFix;
|
||||
|
||||
// terminal values
|
||||
MARTe::uint8 p3Value;
|
||||
MARTe::uint8 p4Value;
|
||||
MARTe::uint8 aps_hvon_state;
|
||||
MARTe::uint8 aps_swon_state;
|
||||
MARTe::uint8 mhvps_hvon_state;
|
||||
MARTe::uint8 bps_hvon_state;
|
||||
MARTe::uint8 bps_swon_state;
|
||||
// PS turn off delay
|
||||
MARTe::uint32 turn_off_delay;
|
||||
|
||||
// SDN trigger command arrival time.
|
||||
MARTe::uint32 sdnTriggerTime;
|
||||
// HVPS state holder
|
||||
bool mhvps_hvon_is_on;
|
||||
bool aps_hvon_is_on;
|
||||
bool aps_swon_is_on;
|
||||
bool bps_hvon_is_on;
|
||||
bool bps_swon_is_on;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Inline method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file JASourceChoiseGAM.cpp
|
||||
* @brief Source file for class JASourceChoiseGAM
|
||||
* @file JASourceChoiceGAM.cpp
|
||||
* @brief Source file for class JASourceChoiceGAM
|
||||
* @date Nov 26, 2018
|
||||
* @author aneto
|
||||
*
|
||||
@@ -17,7 +17,7 @@
|
||||
* or implied. See the Licence permissions and limitations under the Licence.
|
||||
|
||||
* @details This source file contains the definition of all the methods for
|
||||
* the class JASourceChoiseGAM (public, protected, and private). Be aware that some
|
||||
* the class JASourceChoiceGAM (public, protected, and private). Be aware that some
|
||||
* methods, such as those inline could be defined on the header file, instead.
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "JASourceChoiseGAM.h"
|
||||
#include "JASourceChoiceGAM.h"
|
||||
|
||||
#include "AdvancedErrorManagement.h"
|
||||
|
||||
@@ -41,15 +41,15 @@
|
||||
/* Method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
JASourceChoiseGAM::JASourceChoiseGAM() {
|
||||
JASourceChoiceGAM::JASourceChoiceGAM() {
|
||||
// initialize member variables.
|
||||
numberOfPVs = 0;
|
||||
}
|
||||
|
||||
JASourceChoiseGAM::~JASourceChoiseGAM() {
|
||||
JASourceChoiceGAM::~JASourceChoiceGAM() {
|
||||
}
|
||||
|
||||
bool JASourceChoiseGAM::Initialise(MARTe::StructuredDataI & data) {
|
||||
bool JASourceChoiceGAM::Initialise(MARTe::StructuredDataI & data) {
|
||||
//GAM parameters are initialized.
|
||||
using namespace MARTe;
|
||||
bool ok = GAM::Initialise(data);
|
||||
@@ -62,12 +62,12 @@ bool JASourceChoiseGAM::Initialise(MARTe::StructuredDataI & data) {
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JASourceChoiseGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
|
||||
bool JASourceChoiceGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
|
||||
//This method changes internal parameter based on next realtime state.
|
||||
return true;
|
||||
}
|
||||
|
||||
bool JASourceChoiseGAM::Setup() {
|
||||
bool JASourceChoiceGAM::Setup() {
|
||||
// Setup memory for input/output signals on the GAM.
|
||||
using namespace MARTe;
|
||||
bool ok = (numberOfInputSignals == numberOfPVs*3u);
|
||||
@@ -147,7 +147,7 @@ bool JASourceChoiseGAM::Setup() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JASourceChoiseGAM::Execute() {
|
||||
bool JASourceChoiceGAM::Execute() {
|
||||
// This method is called every realtime state thread cycle.
|
||||
using namespace MARTe;
|
||||
|
||||
@@ -185,4 +185,4 @@ bool JASourceChoiseGAM::Execute() {
|
||||
return true;
|
||||
}
|
||||
|
||||
CLASS_REGISTER(JASourceChoiseGAM, "1.0")
|
||||
CLASS_REGISTER(JASourceChoiceGAM, "1.0")
|
||||
@@ -38,13 +38,13 @@
|
||||
/* Class declaration */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
class JASourceChoiseGAM : public MARTe::GAM, public MARTe::StatefulI {
|
||||
class JASourceChoiceGAM : public MARTe::GAM, public MARTe::StatefulI {
|
||||
public:
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
|
||||
JASourceChoiseGAM();
|
||||
JASourceChoiceGAM();
|
||||
|
||||
virtual ~JASourceChoiseGAM();
|
||||
virtual ~JASourceChoiceGAM();
|
||||
|
||||
virtual bool Initialise(MARTe::StructuredDataI & data);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
OBJSX=JASourceChoiseGAM.x
|
||||
OBJSX=JASourceChoiceGAM.x
|
||||
|
||||
PACKAGE=GAMs
|
||||
|
||||
@@ -48,8 +48,8 @@ INCLUDES += -I$(MARTe2_DIR)/Source/Core/FileSystem/L3Streams
|
||||
|
||||
|
||||
all: $(OBJS) $(SUBPROJ) \
|
||||
$(BUILD_DIR)/JASourceChoiseGAM$(LIBEXT) \
|
||||
$(BUILD_DIR)/JASourceChoiseGAM$(DLLEXT)
|
||||
$(BUILD_DIR)/JASourceChoiceGAM$(LIBEXT) \
|
||||
$(BUILD_DIR)/JASourceChoiceGAM$(DLLEXT)
|
||||
echo $(OBJS)
|
||||
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)
|
||||
@@ -51,7 +51,7 @@ JATriangleWaveGAM::JATriangleWaveGAM() {
|
||||
frequency = NULL_PTR(MARTe::float32 *);
|
||||
amplitude = NULL_PTR(MARTe::float32 *);
|
||||
offset = NULL_PTR(MARTe::float32 *);
|
||||
plcStandby = NULL_PTR(MARTe::uint32 *);
|
||||
plcStandby = NULL_PTR(MARTe::uint8 *);
|
||||
waveOutput = NULL_PTR(MARTe::float32 *);
|
||||
time = 0.0f;
|
||||
}
|
||||
@@ -130,9 +130,9 @@ bool JATriangleWaveGAM::Setup() {
|
||||
}
|
||||
else {
|
||||
TypeDescriptor inputType = GetSignalType(InputSignals, plcStandbyIndex);
|
||||
ok = (inputType == UnsignedInteger32Bit);
|
||||
ok = (inputType == UnsignedInteger8Bit);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "PLCSTANDBY shall be defined as uint32.");
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "PLCSTANDBY shall be defined as uint8.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ bool JATriangleWaveGAM::Setup() {
|
||||
frequency = reinterpret_cast<float32 *>(GetInputSignalMemory(freqIndex));
|
||||
amplitude = reinterpret_cast<float32 *>(GetInputSignalMemory(ampIndex));
|
||||
offset = reinterpret_cast<float32 *>(GetInputSignalMemory(offsetIndex));
|
||||
plcStandby = reinterpret_cast<uint32 *>(GetInputSignalMemory(plcStandbyIndex));
|
||||
plcStandby = reinterpret_cast<uint8 *>(GetInputSignalMemory(plcStandbyIndex));
|
||||
waveOutput = reinterpret_cast<float32 *>(GetOutputSignalMemory(0));
|
||||
}
|
||||
return ok;
|
||||
|
||||
@@ -114,7 +114,7 @@ private:
|
||||
//MARTe::uint32 *plcReady;
|
||||
|
||||
// Input signal condition CCPS_STANDBY
|
||||
MARTe::uint32 *plcStandby;
|
||||
MARTe::uint8 *plcStandby;
|
||||
|
||||
MARTe::float32 *waveOutput;
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
SPB = JAMessageGAM.x JAPreProgrammedGAM.x JAModeControlGAM.x \
|
||||
JAWFRecordGAM.x JATriangleWaveGAM.x JARampupGAM.x \
|
||||
JARTStateMachineGAM.x JASDNRTStateMachineGAM.x JATerminalInterfaceGAM.x \
|
||||
JABitSumGAM.x JAConditionalSignalUpdateGAM.x JASourceChoiseGAM.x JABitReverseGAM.x \
|
||||
JAESDNTimeCompareGAM.x
|
||||
JABitSumGAM.x JAConditionalSignalUpdateGAM.x JASourceChoiceGAM.x JABitReverseGAM.x \
|
||||
JAESDNTimeCompareGAM.x ScaleGAM.x
|
||||
|
||||
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
OBJSX=JAMessageGAM.x
|
||||
OBJSX=ScaleGAM.x
|
||||
|
||||
PACKAGE=GAMs
|
||||
|
||||
ROOT_DIR=../../
|
||||
ROOT_DIR=../../../../obj
|
||||
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
|
||||
|
||||
@@ -45,8 +45,8 @@ INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L4Messages
|
||||
|
||||
|
||||
all: $(OBJS) $(SUBPROJ) \
|
||||
$(BUILD_DIR)/JAMessageGAM$(LIBEXT) \
|
||||
$(BUILD_DIR)/JAMessageGAM$(DLLEXT)
|
||||
$(BUILD_DIR)/ScaleGAM$(LIBEXT) \
|
||||
$(BUILD_DIR)/ScaleGAM$(DLLEXT)
|
||||
echo $(OBJS)
|
||||
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)
|
||||
127
EC-GN-JA-PCF-IN/src/main/c++/GAMs/ScaleGAM/ScaleGAM.cpp
Normal file
127
EC-GN-JA-PCF-IN/src/main/c++/GAMs/ScaleGAM/ScaleGAM.cpp
Normal file
@@ -0,0 +1,127 @@
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Standard header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "AdvancedErrorManagement.h"
|
||||
#include "CompilerTypes.h"
|
||||
#include "DataSourceI.h"
|
||||
#include "ScaleGAM.h"
|
||||
#include "TypeDescriptor.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Static definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
namespace MARTe {} // namespace MARTe
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace MARTe {
|
||||
|
||||
const MARTe::uint32 NUM_OUTPUTS = 1u;
|
||||
const MARTe::uint32 NUM_PARAMS = 0u;
|
||||
|
||||
ScaleGAM::ScaleGAM() : GAM(), MessageI() {
|
||||
factors = NULL_PTR(float32 *);
|
||||
inputs = NULL_PTR(float32 *);
|
||||
outputs = NULL_PTR(float32 *);
|
||||
}
|
||||
|
||||
ScaleGAM::~ScaleGAM() {
|
||||
if (factors != NULL_PTR(float32 *)) {
|
||||
delete[] factors;
|
||||
}
|
||||
}
|
||||
|
||||
bool ScaleGAM::Setup() {
|
||||
bool ok = numberOfInputSignals == numberOfOutputSignals;
|
||||
for (uint32 i = 0; i < numberOfInputSignals && ok; i++) {
|
||||
if (GetSignalType(InputSignals, i) != Float32Bit) {
|
||||
REPORT_ERROR(ErrorManagement::InitialisationError,
|
||||
"Input %d should be float32", i);
|
||||
ok = false;
|
||||
}
|
||||
if (GetSignalType(OutputSignals, i) != Float32Bit) {
|
||||
REPORT_ERROR(ErrorManagement::InitialisationError,
|
||||
"Output %d should be float32", i);
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
inputs = (float32 *)inputSignalsMemory;
|
||||
outputs = (float32 *)outputSignalsMemory;
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool ScaleGAM::Initialise(StructuredDataI &data) {
|
||||
bool ret = GAM::Initialise(data);
|
||||
uint32 nin = 0;
|
||||
if (ret && data.MoveRelative("InputSignals")) {
|
||||
nin = data.GetNumberOfChildren();
|
||||
if (nin == 0) {
|
||||
REPORT_ERROR(ErrorManagement::InitialisationError,
|
||||
"Number of inputs should > 0");
|
||||
ret = false;
|
||||
} else {
|
||||
factors = new float32[nin];
|
||||
}
|
||||
for (uint32 i = 0; i < nin && ret; i++) {
|
||||
ret = data.MoveToChild(i);
|
||||
if (!ret) {
|
||||
REPORT_ERROR(ErrorManagement::InitialisationError,
|
||||
"Impossible to move to children %d", i);
|
||||
data.MoveToAncestor(1u);
|
||||
break;
|
||||
}
|
||||
ret = data.Read("Factor", factors[i]);
|
||||
if (!ret) {
|
||||
|
||||
REPORT_ERROR(ErrorManagement::InitialisationError,
|
||||
"Impossible to move to read `Factor` for signal n %d ", i);
|
||||
data.MoveToAncestor(1u);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ret = data.MoveToAncestor(1u) & ret;
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::InitialisationError,
|
||||
"No input signals found");
|
||||
ret &= false;
|
||||
}
|
||||
|
||||
if (ret && data.MoveRelative("OutputSignals")) {
|
||||
uint32 nout = data.GetNumberOfChildren();
|
||||
if (nout != nin) {
|
||||
REPORT_ERROR(
|
||||
ErrorManagement::InitialisationError,
|
||||
"Number of Outputs should be exactly equal to number of outputs",
|
||||
NUM_OUTPUTS);
|
||||
ret = false;
|
||||
}
|
||||
ret = data.MoveToAncestor(1u);
|
||||
} else {
|
||||
REPORT_ERROR(ErrorManagement::InitialisationError,
|
||||
"No output signals, exactly %d outputs are needed",
|
||||
NUM_OUTPUTS);
|
||||
ret = false;
|
||||
}
|
||||
REPORT_ERROR(ret ? ErrorManagement::Information
|
||||
: ErrorManagement::InitialisationError,
|
||||
ret ? "%s Initialised" : "%s Failed to initialise", GetName());
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ScaleGAM::Execute() {
|
||||
for (uint32 i = 0; i < numberOfInputSignals; i++) {
|
||||
outputs[i] = inputs[i] / factors[i];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CLASS_REGISTER(ScaleGAM, "1.0")
|
||||
} /* namespace MARTe */
|
||||
71
EC-GN-JA-PCF-IN/src/main/c++/GAMs/ScaleGAM/ScaleGAM.h
Normal file
71
EC-GN-JA-PCF-IN/src/main/c++/GAMs/ScaleGAM/ScaleGAM.h
Normal file
@@ -0,0 +1,71 @@
|
||||
|
||||
#ifndef SCALE_GAM_H
|
||||
#define SCALE_GAM_H
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Standard header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "Architecture/x86_gcc/CompilerTypes.h"
|
||||
#include "GAM.h"
|
||||
#include "MessageI.h"
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Class declaration */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace MARTe {
|
||||
class ScaleGAM : public GAM, public MessageI {
|
||||
public:
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
|
||||
/**
|
||||
* @brief Constructor. NOOP.
|
||||
*/
|
||||
ScaleGAM();
|
||||
|
||||
/**
|
||||
* @brief Destructor. NOOP.
|
||||
*/
|
||||
virtual ~ScaleGAM();
|
||||
|
||||
/**
|
||||
* @brief Initialises the output signal memory with default values provided
|
||||
* through configuration.
|
||||
* @return true if the pre-conditions are met.
|
||||
* @pre
|
||||
* The pairs of signals have the same byte size.
|
||||
*/
|
||||
virtual bool Setup();
|
||||
|
||||
/**
|
||||
* @see DataSourceI::Initialise
|
||||
* @details Initialise the parameters of the ComparatorGAM
|
||||
* @return true if the pre-conditions are met.
|
||||
* @pre
|
||||
* The number of input signals is even and each pair of signals have the same
|
||||
* type.
|
||||
**/
|
||||
virtual bool Initialise(StructuredDataI &data);
|
||||
|
||||
/**
|
||||
* @brief Execute method. NOOP.
|
||||
* @return true.
|
||||
*/
|
||||
virtual bool Execute();
|
||||
|
||||
private:
|
||||
float32 * inputs;
|
||||
float32 * outputs;
|
||||
float32 * factors;
|
||||
};
|
||||
|
||||
} // namespace MARTe
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Inline method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#endif
|
||||
151
EC-GN-JA-PCF-IN/src/main/resources/dan/DAN_ACQ.xml
Normal file
151
EC-GN-JA-PCF-IN/src/main/resources/dan/DAN_ACQ.xml
Normal file
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
DAN Configuration
|
||||
Root: danApi
|
||||
CODAC-VERSION: 5.1b5
|
||||
WARNING: This is an automatically generated file. PLEASE DO NOT MODIFY.
|
||||
-->
|
||||
|
||||
<danApi>
|
||||
<version>1.0.0</version>
|
||||
<ICprogram name="JADA_RF01App">
|
||||
<source name="FastAnalogDAN_float32">
|
||||
<itemDanType>danFloat</itemDanType>
|
||||
<maxTransferRate>100000</maxTransferRate>
|
||||
<advancedSource>
|
||||
<dataModel>DM_BLOCK2D_VAR</dataModel>
|
||||
<streamType>DATA_D0</streamType>
|
||||
<checkPolicy>NO_CHECK</checkPolicy>
|
||||
<queueSize>1000</queueSize>
|
||||
<profMonitoring>1</profMonitoring>
|
||||
<timeFormat>UTC</timeFormat>
|
||||
<debug>
|
||||
<srvChunkHeaderSize>20</srvChunkHeaderSize>
|
||||
<srvChunkSize>10000</srvChunkSize>
|
||||
<srvBufferSize>2</srvBufferSize>
|
||||
</debug>
|
||||
</advancedSource>
|
||||
<deviceInfo>
|
||||
<deviceName>DAQ</deviceName>
|
||||
<deviceVersion>v1.0</deviceVersion>
|
||||
<operationalMode>0</operationalMode>
|
||||
<manufactureCode>0</manufactureCode>
|
||||
</deviceInfo>
|
||||
<channelsInfo sequence="SEQUENCIAL">
|
||||
<channel number="0" variable="EC-GN-P01:GY_APS_V_MEAS" label="EC-GN-P01:GY_APS_V_MEAS" status="ENABLE"></channel>
|
||||
<channel number="1" variable="EC-GN-P01:GY_APS_I_MEAS" label="EC-GN-P01:GY_APS_I_MEAS" status="ENABLE"></channel>
|
||||
<channel number="2" variable="EC-GN-P01:GY_BPS_V_MEAS" label="EC-GN-P01:GY_BPS_V_MEAS" status="ENABLE"></channel>
|
||||
<channel number="3" variable="EC-GN-P01:GY_BPS_I_MEAS" label="EC-GN-P01:GY_BPS_I_MEAS" status="ENABLE"></channel>
|
||||
<channel number="4" variable="EC-GN-P01:GY_MHV_V_MEAS" label="EC-GN-P01:GY_MHV_V_MEAS" status="ENABLE"></channel>
|
||||
<channel number="5" variable="EC-GN-P01:GY_MHV_I_MEAS" label="EC-GN-P01:GY_MHV_I_MEAS" status="ENABLE"></channel>
|
||||
<channel number="6" variable="EC-GN-P01:GY_ARC1_V_MEAS" label="EC-GN-P01:GY_ARC1_V_MEAS" status="ENABLE"></channel>
|
||||
<channel number="7" variable="EC-GN-P01:GY_ARC2_V_MEAS" label="EC-GN-P01:GY_ARC2_V_MEAS" status="ENABLE"></channel>
|
||||
<channel number="8" variable="EC-GN-P01:GY_ARC3_V_MEAS" label="EC-GN-P01:GY_ARC3_V_MEAS" status="ENABLE"></channel>
|
||||
<channel number="9" variable="EC-GN-P01:GY_RF_V_MEAS" label="EC-GN-P01:GY_RF_V_MEAS" status="ENABLE"></channel>
|
||||
</channelsInfo>
|
||||
</source>
|
||||
|
||||
|
||||
<source name="DANDIODataSource_uint8">
|
||||
<itemDanType>danUInt8</itemDanType>
|
||||
<maxTransferRate>100000</maxTransferRate>
|
||||
<advancedSource>
|
||||
<dataModel>DM_BLOCK2D_VAR</dataModel>
|
||||
<streamType>DATA_D0</streamType>
|
||||
<checkPolicy>NO_CHECK</checkPolicy>
|
||||
<queueSize>1000</queueSize>
|
||||
<profMonitoring>1</profMonitoring>
|
||||
<timeFormat>UTC</timeFormat>
|
||||
<debug>
|
||||
<srvChunkHeaderSize>20</srvChunkHeaderSize>
|
||||
<srvChunkSize>10000</srvChunkSize>
|
||||
<srvBufferSize>2</srvBufferSize>
|
||||
</debug>
|
||||
</advancedSource>
|
||||
<deviceInfo>
|
||||
<deviceName>DAQ</deviceName>
|
||||
<deviceVersion>v1.0</deviceVersion>
|
||||
<operationalMode>0</operationalMode>
|
||||
<manufactureCode>0</manufactureCode>
|
||||
</deviceInfo>
|
||||
<channelsInfo sequence="SEQUENCIAL">
|
||||
<channel number="0" variable="EC-GN-P01:GYA_APS_READY" label="EC-GN-P01:GYA_APS_READY" status="ENABLE"></channel>
|
||||
<channel number="1" variable="EC-GN-P01:GYA_APS_FLT" label="EC-GN-P01:GYA_APS_FLT" status="ENABLE"></channel>
|
||||
<channel number="2" variable="EC-GN-P01:GYA_BPS_READY" label="EC-GN-P01:GYA_BPS_READY" status="ENABLE"></channel>
|
||||
<channel number="3" variable="EC-GN-P01:GYA_BPS_FLT" label="EC-GN-P01:GYA_BPS_FLT" status="ENABLE"></channel>
|
||||
<channel number="4" variable="EC-GN-P01:MHVPS_OV" label="EC-GN-P01:MHVPS_OV" status="ENABLE"></channel>
|
||||
<channel number="5" variable="EC-GN-P01:MHVPS_OC" label="EC-GN-P01:MHVPS_OC" status="ENABLE"></channel>
|
||||
<channel number="6" variable="EC-GN-P01:MHVPS_FLT" label="EC-GN-P01:MHVPS_FLT" status="ENABLE"></channel>
|
||||
<channel number="7" variable="EC-GN-P01:MHVPS_READY" label="EC-GN-P01:MHVPS_READY" status="ENABLE"></channel>
|
||||
<channel number="8" variable="EC-GN-P01:ECPC_MOD" label="EC-GN-P01:ECPC_MOD" status="ENABLE"></channel>
|
||||
<channel number="9" variable="EC-GN-P01:FAST_TRIP" label="EC-GN-P01:FAST_TRIP" status="ENABLE"></channel>
|
||||
<channel number="10" variable="EC-GN-P01:CRIO_RV1" label="EC-GN-P01:CRIO_RV1" status="ENABLE"></channel>
|
||||
<channel number="11" variable="EC-GN-P01:CRIO_RV2" label="EC-GN-P01:CRIO_RV2" status="ENABLE"></channel>
|
||||
<channel number="12" variable="EC-GN-P01:CRIO_RV3" label="EC-GN-P01:CRIO_RV3" status="ENABLE"></channel>
|
||||
<channel number="13" variable="EC-GN-P01:PLC_ITL" label="EC-GN-P01:PLC_ITL" status="ENABLE"></channel>
|
||||
<channel number="14" variable="EC-GN-P01:PLC_STANDBY" label="EC-GN-P01:PLC_STANDBY" status="ENABLE"></channel>
|
||||
<channel number="15" variable="EC-GN-P01:PLC_READY" label="EC-GN-P01:PLC_READY" status="ENABLE"></channel>
|
||||
<channel number="16" variable="EC-GN-P01:PLC_ON" label="EC-GN-P01:PLC_ON" status="ENABLE"></channel>
|
||||
<channel number="17" variable="EC-GN-P01:PLC_PERMIT" label="EC-GN-P01:PLC_PERMIT" status="ENABLE"></channel>
|
||||
<channel number="18" variable="EC-GN-P01:PLC_OP_SELECTED" label="EC-GN-P01:PLC_OP_SELECTED" status="ENABLE"></channel>
|
||||
<channel number="19" variable="EC-GN-P01:PLC_CC_OP_SELECTED" label="EC-GN-P01:PLC_CC_OP_SELECTED" status="ENABLE"></channel>
|
||||
<channel number="20" variable="EC-GN-P01:PLC_SYNCMODE" label="EC-GN-P01:PLC_SYNCMODE" status="ENABLE"></channel>
|
||||
<channel number="21" variable="EC-GN-P01:TRIGGER" label="EC-GN-P01:TRIGGER" status="ENABLE"></channel>
|
||||
<channel number="22" variable="EC-GN-P01:BEAM_ON_STAT" label="EC-GN-P01:BEAM_ON_STAT" status="ENABLE"></channel>
|
||||
<channel number="23" variable="EC-GN-P01:HVARMED" label="EC-GN-P01:HVARMED" status="ENABLE"></channel>
|
||||
<channel number="24" variable="EC-GN-P01:HVINJECTION" label="EC-GN-P01:HVINJECTION" status="ENABLE"></channel>
|
||||
<channel number="25" variable="EC-GN-P01:RFON" label="EC-GN-P01:RFON" status="ENABLE"></channel>
|
||||
</channelsInfo>
|
||||
</source>
|
||||
|
||||
<source name="DANDIODataSource_uint32">
|
||||
<itemDanType>danUInt32</itemDanType>
|
||||
<maxTransferRate>100000</maxTransferRate>
|
||||
<advancedSource>
|
||||
<dataModel>DM_BLOCK2D_VAR</dataModel>
|
||||
<streamType>DATA_D0</streamType>
|
||||
<checkPolicy>NO_CHECK</checkPolicy>
|
||||
<queueSize>1000</queueSize>
|
||||
<profMonitoring>1</profMonitoring>
|
||||
<timeFormat>UTC</timeFormat>
|
||||
<debug>
|
||||
<srvChunkHeaderSize>20</srvChunkHeaderSize>
|
||||
<srvChunkSize>10000</srvChunkSize>
|
||||
<srvBufferSize>2</srvBufferSize>
|
||||
</debug>
|
||||
</advancedSource>
|
||||
<deviceInfo>
|
||||
<deviceName>DAQ</deviceName>
|
||||
<deviceVersion>v1.0</deviceVersion>
|
||||
<operationalMode>0</operationalMode>
|
||||
<manufactureCode>0</manufactureCode>
|
||||
</deviceInfo>
|
||||
<channelsInfo sequence="SEQUENCIAL">
|
||||
<channel number="0" variable="EC-GN-P01:PXI6528_Status" label="EC-GN-P01:PXI6528_Status" status="ENABLE"></channel>
|
||||
<channel number="1" variable="EC-GN-P01:BEAM_ON_TIME" label="EC-GN-P01:BEAM_ON_TIME" status="ENABLE"></channel>
|
||||
<channel number="2" variable="EC-GN-P01:RFON_TIME" label="EC-GN-P01:RFON_TIME" status="ENABLE"></channel>
|
||||
|
||||
</channelsInfo>
|
||||
</source>
|
||||
|
||||
|
||||
<danStreamer name="DANSTREAMER0">
|
||||
<link>ALL</link>
|
||||
<internal>
|
||||
<danInterface>${DAN_INTERFACE_NAME}</danInterface>
|
||||
<!-- GGC
|
||||
<danInterface>eno1</danInterface>
|
||||
-->
|
||||
<servers>
|
||||
<policy>IF_FAIL_NEXT</policy>
|
||||
<server >${DAN_ARCHIVE_MASTER}</server>
|
||||
<server >${DAN_ARCHIVE_SLAVE}</server>
|
||||
<!-- GGC
|
||||
<server>10.142.0.24</server>
|
||||
<server>10.142.0.24</server>
|
||||
-->
|
||||
</servers>
|
||||
</internal>
|
||||
</danStreamer>
|
||||
</ICprogram>
|
||||
</danApi>
|
||||
@@ -0,0 +1,121 @@
|
||||
package schema
|
||||
|
||||
#Classes: {
|
||||
ExtractBitGAM: {...}
|
||||
CompactBitGAM: {...}
|
||||
HttpService: {
|
||||
Port!: uint & >1024 & <49151
|
||||
WebRoot?: string
|
||||
Timeout?: uint
|
||||
ListenMaxConnection?: uint
|
||||
AcceptTimeout?: uint
|
||||
MaxNumberOfThreads?: uint
|
||||
MinNumberOfThreads?: uint
|
||||
}
|
||||
|
||||
HttpObjectBrowser: {
|
||||
Root!: string
|
||||
...
|
||||
}
|
||||
HttpDataMonitor: {
|
||||
...
|
||||
}
|
||||
HttpObjectBrowser: {
|
||||
Root!: string
|
||||
}
|
||||
HttpDirectoryResource: {
|
||||
BaseDir: string
|
||||
}
|
||||
HttpMessageInterface: {
|
||||
...
|
||||
}
|
||||
NI6528: {
|
||||
...
|
||||
}
|
||||
ConfigurationDatabase: {
|
||||
...
|
||||
}
|
||||
JAWFRecordGAM: {
|
||||
Directory!: string
|
||||
...
|
||||
}
|
||||
JAPreProgrammedGAM: {
|
||||
Directory!: string
|
||||
PreProgrammedPeriodMs!: uint32
|
||||
...
|
||||
}
|
||||
JAConditionalSignalUpdateGAM: {
|
||||
Operation!: "AND" | "OR" | "XOR" | "NOR"
|
||||
InputSignals: {
|
||||
[_]: {
|
||||
Comparator!: "EQUALS" | "GREATER" | "LESSER"
|
||||
Value!: number
|
||||
Type!: string
|
||||
...
|
||||
}
|
||||
}
|
||||
OutputSignals: {
|
||||
[_]: {
|
||||
DefaultValue!: uint32
|
||||
Value!: uint32
|
||||
Type!: string
|
||||
...
|
||||
}
|
||||
}
|
||||
...
|
||||
}
|
||||
JASourceChoiceGAM: {
|
||||
...
|
||||
}
|
||||
JAMessageGAM: {
|
||||
Operation!: "AND" | "OR"
|
||||
InputSignals: {
|
||||
[_]: {
|
||||
Value!: number
|
||||
Comparator!: "EQUALS" | "GREATER" | "LESS" | "EQUALS_OR_GREATER" | "EQUALS_OR_LESS" | "NOT"
|
||||
Type!: string
|
||||
...
|
||||
}
|
||||
}
|
||||
Event!: {
|
||||
Class: "Message"
|
||||
Destination!: string
|
||||
Function!: string
|
||||
}
|
||||
...
|
||||
}
|
||||
JAModeControlGAM: {
|
||||
...
|
||||
}
|
||||
JARTStateMachineGAM: {
|
||||
ConditionTrigger: 0 | 1
|
||||
mhvps_hvon: uint
|
||||
aps_hvon: uint
|
||||
aps_swon: uint
|
||||
bps_hvon: uint
|
||||
bps_swon: uint
|
||||
...
|
||||
}
|
||||
JASDNRTStateMachineGAM: {
|
||||
ConditionTrigger: 0 | 1
|
||||
mhvps_hvon: uint
|
||||
aps_hvon: uint
|
||||
aps_swon: uint
|
||||
bps_hvon: uint
|
||||
bps_swon: uint
|
||||
...
|
||||
}
|
||||
DANSource: {
|
||||
...
|
||||
}
|
||||
JATriangleWaveGAM: {
|
||||
...
|
||||
}
|
||||
JARampupGAM: {
|
||||
...
|
||||
}
|
||||
NI6683H: {
|
||||
BoardId: uint
|
||||
...
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,103 +0,0 @@
|
||||
#test configuration file2,,,,,,
|
||||
#Time,MHVPS,BPS,APS,MC,GC,FHPS
|
||||
0,60,45,0,10,10,10
|
||||
10,55,40,-2,9,9,9
|
||||
20,50,35,-4,8,8,8
|
||||
30,45,30,-6,7,7,7
|
||||
40,40,25,-8,6,6,6
|
||||
50,35,20,-10,5,5,5
|
||||
60,30,15,-12,4,4,4
|
||||
70,25,10,-14,3,3,3
|
||||
80,20,5,-16,2,2,2
|
||||
90,15,0,-18,1,1,1
|
||||
100,10,-5,-20,0,0,0
|
||||
110,5,0,-22,1,1,1
|
||||
120,0,5,-20,2,2,2
|
||||
130,-5,10,-18,3,3,3
|
||||
140,0,15,-16,4,4,4
|
||||
150,5,20,-14,5,5,5
|
||||
160,10,25,-12,6,6,6
|
||||
170,15,30,-10,7,7,7
|
||||
180,20,35,-8,8,8,8
|
||||
190,25,40,-6,9,9,9
|
||||
200,30,45,-4,10,10,10
|
||||
210,35,40,-2,9,9,9
|
||||
220,40,35,0,8,8,8
|
||||
230,45,30,-2,7,7,7
|
||||
240,50,25,-4,6,6,6
|
||||
250,55,20,-6,5,5,5
|
||||
260,60,15,-8,4,4,4
|
||||
270,55,10,-10,3,3,3
|
||||
280,50,5,-12,2,2,2
|
||||
290,45,0,-14,1,1,1
|
||||
300,40,-5,-16,0,0,0
|
||||
310,35,0,-18,1,1,1
|
||||
320,30,5,-20,2,2,2
|
||||
330,25,10,-25,3,3,3
|
||||
340,20,15,-20,4,4,4
|
||||
350,15,20,-18,5,5,5
|
||||
360,10,25,-16,6,6,6
|
||||
370,5,30,-14,7,7,7
|
||||
380,0,35,-12,8,8,8
|
||||
390,-5,40,-10,9,9,9
|
||||
400,0,45,-8,10,10,10
|
||||
410,5,40,-6,9,9,9
|
||||
420,10,35,-4,8,8,8
|
||||
430,15,30,-2,7,7,7
|
||||
440,20,25,0,6,6,6
|
||||
450,25,20,-2,5,5,5
|
||||
460,30,15,-4,4,4,4
|
||||
470,35,10,-6,3,3,3
|
||||
480,40,5,-8,2,2,2
|
||||
490,45,0,-10,1,1,1
|
||||
500,50,-5,-12,0,0,0
|
||||
510,55,0,-14,1,1,1
|
||||
520,60,5,-16,2,2,2
|
||||
530,55,10,-18,3,3,3
|
||||
540,50,15,-20,4,4,4
|
||||
550,45,20,-30,5,5,5
|
||||
560,40,25,-20,6,6,6
|
||||
570,35,30,-18,7,7,7
|
||||
580,30,35,-16,8,8,8
|
||||
590,25,40,-14,9,9,9
|
||||
600,20,45,-12,10,10,10
|
||||
610,15,40,-10,9,9,9
|
||||
620,10,35,-8,8,8,8
|
||||
630,5,30,-6,7,7,7
|
||||
640,0,25,-4,6,6,6
|
||||
650,-5,20,-2,5,5,5
|
||||
660,0,15,0,4,4,4
|
||||
670,5,10,-2,3,3,3
|
||||
680,10,5,-4,2,2,2
|
||||
690,15,0,-6,1,1,1
|
||||
700,20,-5,-8,0,0,0
|
||||
710,25,0,-10,1,1,1
|
||||
720,30,5,-12,2,2,2
|
||||
730,35,10,-14,3,3,3
|
||||
740,40,15,-16,4,4,4
|
||||
750,45,20,-18,5,5,5
|
||||
760,50,25,-20,6,6,6
|
||||
770,55,30,-22,7,7,7
|
||||
780,60,35,-20,8,8,8
|
||||
790,55,40,-18,9,9,9
|
||||
800,50,45,-16,10,10,10
|
||||
810,45,40,-14,9,9,9
|
||||
820,40,35,-12,8,8,8
|
||||
830,35,30,-10,7,7,7
|
||||
840,30,25,-8,6,6,6
|
||||
850,25,20,-6,5,5,5
|
||||
860,20,15,-4,4,4,4
|
||||
870,15,10,-2,3,3,3
|
||||
880,10,5,0,2,2,2
|
||||
890,5,0,-2,1,1,1
|
||||
900,0,-5,-4,0,0,0
|
||||
910,-5,0,-6,1,1,1
|
||||
920,0,5,-8,2,2,2
|
||||
930,5,10,-10,3,3,3
|
||||
940,10,15,-12,4,4,4
|
||||
950,15,20,-14,5,5,5
|
||||
960,20,25,-16,6,6,6
|
||||
970,25,30,-18,7,7,7
|
||||
980,30,35,-20,8,8,8
|
||||
990,35,40,-22,9,9,9
|
||||
1000,40,45,-20,10,10,10
|
||||
|
@@ -1,103 +0,0 @@
|
||||
#test configuration file2,,,,,,
|
||||
#Time,MHVPS,BPS,APS,MC,GC,FHPS
|
||||
0,60,45,10,10,10,10
|
||||
10,55,40,9,9,9,9
|
||||
20,50,35,8,8,8,8
|
||||
30,45,30,7,7,7,7
|
||||
40,40,25,6,6,6,6
|
||||
50,35,20,5,5,5,5
|
||||
60,30,15,4,4,4,4
|
||||
70,25,10,3,3,3,3
|
||||
80,20,5,2,2,2,2
|
||||
90,15,0,1,1,1,1
|
||||
100,10,-5,0,0,0,0
|
||||
110,5,0,1,1,1,1
|
||||
120,0,5,2,2,2,2
|
||||
130,-5,10,3,3,3,3
|
||||
140,0,15,4,4,4,4
|
||||
150,5,20,5,5,5,5
|
||||
160,10,25,6,6,6,6
|
||||
170,15,30,7,7,7,7
|
||||
180,20,35,8,8,8,8
|
||||
190,25,40,9,9,9,9
|
||||
200,30,45,10,10,10,10
|
||||
210,35,40,11,9,9,9
|
||||
220,40,35,12,8,8,8
|
||||
230,45,30,11,7,7,7
|
||||
240,50,25,10,6,6,6
|
||||
250,55,20,9,5,5,5
|
||||
260,60,15,8,4,4,4
|
||||
270,55,10,7,3,3,3
|
||||
280,50,5,6,2,2,2
|
||||
290,45,0,5,1,1,1
|
||||
300,40,-5,4,0,0,0
|
||||
310,35,0,3,1,1,1
|
||||
320,30,5,2,2,2,2
|
||||
330,25,10,1,3,3,3
|
||||
340,20,15,0,4,4,4
|
||||
350,15,20,1,5,5,5
|
||||
360,10,25,2,6,6,6
|
||||
370,5,30,3,7,7,7
|
||||
380,0,35,4,8,8,8
|
||||
390,-5,40,5,9,9,9
|
||||
400,0,45,6,10,10,10
|
||||
410,5,40,7,9,9,9
|
||||
420,10,35,8,8,8,8
|
||||
430,15,30,9,7,7,7
|
||||
440,20,25,10,6,6,6
|
||||
450,25,20,11,5,5,5
|
||||
460,30,15,12,4,4,4
|
||||
470,35,10,11,3,3,3
|
||||
480,40,5,10,2,2,2
|
||||
490,45,0,9,1,1,1
|
||||
500,50,-5,8,0,0,0
|
||||
510,55,0,7,1,1,1
|
||||
520,60,5,6,2,2,2
|
||||
530,55,10,5,3,3,3
|
||||
540,50,15,4,4,4,4
|
||||
550,45,20,3,5,5,5
|
||||
560,40,25,2,6,6,6
|
||||
570,35,30,1,7,7,7
|
||||
580,30,35,0,8,8,8
|
||||
590,25,40,1,9,9,9
|
||||
600,20,45,2,10,10,10
|
||||
610,15,40,3,9,9,9
|
||||
620,10,35,4,8,8,8
|
||||
630,5,30,5,7,7,7
|
||||
640,0,25,6,6,6,6
|
||||
650,-5,20,7,5,5,5
|
||||
660,0,15,8,4,4,4
|
||||
670,5,10,9,3,3,3
|
||||
680,10,5,10,2,2,2
|
||||
690,15,0,11,1,1,1
|
||||
700,20,-5,12,0,0,0
|
||||
710,25,0,11,1,1,1
|
||||
720,30,5,10,2,2,2
|
||||
730,35,10,9,3,3,3
|
||||
740,40,15,8,4,4,4
|
||||
750,45,20,7,5,5,5
|
||||
760,50,25,6,6,6,6
|
||||
770,55,30,5,7,7,7
|
||||
780,60,35,4,8,8,8
|
||||
790,55,40,3,9,9,9
|
||||
800,50,45,2,10,10,10
|
||||
810,45,40,1,9,9,9
|
||||
820,40,35,0,8,8,8
|
||||
830,35,30,1,7,7,7
|
||||
840,30,25,2,6,6,6
|
||||
850,25,20,3,5,5,5
|
||||
860,20,15,4,4,4,4
|
||||
870,15,10,5,3,3,3
|
||||
880,10,5,6,2,2,2
|
||||
890,5,0,7,1,1,1
|
||||
900,0,-5,8,0,0,0
|
||||
910,-5,0,9,1,1,1
|
||||
920,0,5,10,2,2,2
|
||||
930,5,10,11,3,3,3
|
||||
940,10,15,12,4,4,4
|
||||
950,15,20,11,5,5,5
|
||||
960,20,25,10,6,6,6
|
||||
970,25,30,9,7,7,7
|
||||
980,30,35,8,8,8,8
|
||||
990,35,40,7,9,9,9
|
||||
1000,40,45,6,10,10,10
|
||||
|
@@ -1,103 +0,0 @@
|
||||
#test configuration file2,,,,,,
|
||||
#Time,MHVPS,BPS,APS,MC,GC,FHPS
|
||||
0,60,45,10,10,10,10
|
||||
10,55,40,7,9,9,9
|
||||
20,50,35,4,8,8,8
|
||||
30,45,30,1,7,7,7
|
||||
40,40,25,-2,6,6,6
|
||||
50,35,20,-5,5,5,5
|
||||
60,30,15,-8,4,4,4
|
||||
70,25,10,-11,3,3,3
|
||||
80,20,5,-14,2,2,2
|
||||
90,15,0,-17,1,1,1
|
||||
100,10,-5,-20,0,0,0
|
||||
110,5,0,-23,1,1,1
|
||||
120,0,5,-20,2,2,2
|
||||
130,-5,10,-17,3,3,3
|
||||
140,0,15,-14,4,4,4
|
||||
150,5,20,-11,5,5,5
|
||||
160,10,25,-8,6,6,6
|
||||
170,15,30,-5,7,7,7
|
||||
180,20,35,-2,8,8,8
|
||||
190,25,40,1,9,9,9
|
||||
200,30,45,4,10,10,10
|
||||
210,35,40,7,9,9,9
|
||||
220,40,35,10,8,8,8
|
||||
230,45,30,13,7,7,7
|
||||
240,50,25,10,6,6,6
|
||||
250,55,20,7,5,5,5
|
||||
260,60,15,4,4,4,4
|
||||
270,55,10,1,3,3,3
|
||||
280,50,5,-2,2,2,2
|
||||
290,45,0,-5,1,1,1
|
||||
300,40,-5,-8,0,0,0
|
||||
310,35,0,-11,1,1,1
|
||||
320,30,5,-14,2,2,2
|
||||
330,25,10,-17,3,3,3
|
||||
340,20,15,-20,4,4,4
|
||||
350,15,20,-23,5,5,5
|
||||
360,10,25,-20,6,6,6
|
||||
370,5,30,-17,7,7,7
|
||||
380,0,35,-14,8,8,8
|
||||
390,-5,40,-11,9,9,9
|
||||
400,0,45,-8,10,10,10
|
||||
410,5,40,-5,9,9,9
|
||||
420,10,35,-2,8,8,8
|
||||
430,15,30,1,7,7,7
|
||||
440,20,25,4,6,6,6
|
||||
450,25,20,7,5,5,5
|
||||
460,30,15,10,4,4,4
|
||||
470,35,10,13,3,3,3
|
||||
480,40,5,10,2,2,2
|
||||
490,45,0,7,1,1,1
|
||||
500,50,-5,4,0,0,0
|
||||
510,55,0,1,1,1,1
|
||||
520,60,5,-2,2,2,2
|
||||
530,55,10,-5,3,3,3
|
||||
540,50,15,-8,4,4,4
|
||||
550,45,20,-11,5,5,5
|
||||
560,40,25,-14,6,6,6
|
||||
570,35,30,-17,7,7,7
|
||||
580,30,35,-20,8,8,8
|
||||
590,25,40,-23,9,9,9
|
||||
600,20,45,-20,10,10,10
|
||||
610,15,40,-17,9,9,9
|
||||
620,10,35,-14,8,8,8
|
||||
630,5,30,-11,7,7,7
|
||||
640,0,25,-8,6,6,6
|
||||
650,-5,20,-5,5,5,5
|
||||
660,0,15,-2,4,4,4
|
||||
670,5,10,1,3,3,3
|
||||
680,10,5,4,2,2,2
|
||||
690,15,0,7,1,1,1
|
||||
700,20,-5,10,0,0,0
|
||||
710,25,0,13,1,1,1
|
||||
720,30,5,10,2,2,2
|
||||
730,35,10,7,3,3,3
|
||||
740,40,15,4,4,4,4
|
||||
750,45,20,1,5,5,5
|
||||
760,50,25,-2,6,6,6
|
||||
770,55,30,-5,7,7,7
|
||||
780,60,35,-8,8,8,8
|
||||
790,55,40,-11,9,9,9
|
||||
800,50,45,-14,10,10,10
|
||||
810,45,40,-17,9,9,9
|
||||
820,40,35,-20,8,8,8
|
||||
830,35,30,-23,7,7,7
|
||||
840,30,25,-20,6,6,6
|
||||
850,25,20,-17,5,5,5
|
||||
860,20,15,-14,4,4,4
|
||||
870,15,10,-11,3,3,3
|
||||
880,10,5,-8,2,2,2
|
||||
890,5,0,-5,1,1,1
|
||||
900,0,-5,-2,0,0,0
|
||||
910,-5,0,1,1,1,1
|
||||
920,0,5,4,2,2,2
|
||||
930,5,10,7,3,3,3
|
||||
940,10,15,10,4,4,4
|
||||
950,15,20,13,5,5,5
|
||||
960,20,25,10,6,6,6
|
||||
970,25,30,7,7,7,7
|
||||
980,30,35,4,8,8,8
|
||||
990,35,40,1,9,9,9
|
||||
1000,40,45,-2,10,10,10
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
#############################################################
|
||||
#
|
||||
# Copyright 2015 F4E | European Joint Undertaking for ITER
|
||||
# and the Development of Fusion Energy ('Fusion for Energy')
|
||||
# Copyright 2015 EFDA | 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
|
||||
@@ -20,8 +20,11 @@
|
||||
# See the Licence for the specific language governing
|
||||
# permissions and limitations under the Licence.
|
||||
#
|
||||
# $Id: Makefile.gcc 3 2012-01-15 16:26:07Z aneto $
|
||||
# $Id: Makefile.gcc 3 2015-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
|
||||
#Defines the target architecture
|
||||
export TARGET=cfg
|
||||
|
||||
include Makefile.inc
|
||||
@@ -20,23 +20,25 @@
|
||||
# See the Licence for the specific language governing
|
||||
# permissions and limitations under the Licence.
|
||||
#
|
||||
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
SPB = RandomDataSource.x NI6528.x JAEPICSCA.x
|
||||
|
||||
#Named of the unit files to be compiled
|
||||
OBJSX=JARF01App.x
|
||||
MDT=mdt
|
||||
SOURCES=src/*.marte src/state_machine/*.marte src/data/*.marte src/thread1/*.marte src/thread2/*.marte src/thread3/*.marte src/thread4/*.marte src/thread5/*.marte src/thread6/*.marte
|
||||
|
||||
#Location of the Build directory where the configuration file will be written to
|
||||
BUILD_DIR?=.
|
||||
|
||||
#Location of the MakeDefaults directory.
|
||||
#Note that the MARTe2_DIR environment variable
|
||||
#must have been exported before
|
||||
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
||||
|
||||
ROOT_DIR=..
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
|
||||
|
||||
all: $(OBJS) $(SUBPROJ) check-env
|
||||
echo $(OBJS)
|
||||
all: $(OBJS)
|
||||
$(MDT) build $(SOURCES) -o $(BUILD_DIR)/$(OBJSX)
|
||||
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)
|
||||
|
||||
check-env:
|
||||
ifndef MARTe2_DIR
|
||||
$(error MARTe2_DIR is undefined)
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,75 @@
|
||||
#include "JAGyrotron/StateMachine.cfg"
|
||||
|
||||
// RealTime Application node
|
||||
+JAGyrotronRTApp = {
|
||||
Class = RealTimeApplication
|
||||
+Functions = {
|
||||
Class = ReferenceContainer
|
||||
|
||||
#include "JAGyrotron/Functions_Th1.cfg"
|
||||
|
||||
#include "JAGyrotron/Functions_Th2.cfg"
|
||||
|
||||
#include "JAGyrotron/Functions_Th3.cfg"
|
||||
|
||||
#include "JAGyrotron/Functions_Th4.cfg"
|
||||
|
||||
}
|
||||
+Data = {
|
||||
Class = ReferenceContainer
|
||||
DefaultDataSource = DDB1
|
||||
|
||||
+Timings = {
|
||||
Class = TimingDataSource
|
||||
}
|
||||
+Display = {
|
||||
Class = LoggerDataSource
|
||||
}
|
||||
|
||||
+RealTimeThreadAsyncBridge = {
|
||||
Class = RealTimeThreadAsyncBridge
|
||||
NumberOfBuffers = 5
|
||||
}
|
||||
|
||||
+TriggerAsyncBridge = {
|
||||
Class = RealTimeThreadAsyncBridge
|
||||
NumberOfBuffers = 1
|
||||
BlockingMode = 2
|
||||
}
|
||||
|
||||
#include "JAGyrotron/Data_Th1.cfg"
|
||||
|
||||
#include "JAGyrotron/Data_Th2.cfg"
|
||||
|
||||
#include "JAGyrotron/Data_Th3.cfg"
|
||||
|
||||
#include "JAGyrotron/Data_Th4.cfg"
|
||||
|
||||
}
|
||||
+States = {
|
||||
Class = ReferenceContainer
|
||||
|
||||
#include "JAGyrotron/State_Disabled.cfg"
|
||||
|
||||
#include "JAGyrotron/State_WaitStandby.cfg"
|
||||
|
||||
#include "JAGyrotron/State_WaitReady.cfg"
|
||||
|
||||
#include "JAGyrotron/State_WaitPermit.cfg"
|
||||
|
||||
#include "JAGyrotron/State_WaitHVON.cfg"
|
||||
|
||||
#include "JAGyrotron/State_WaitHVON_SDN.cfg"
|
||||
|
||||
#include "JAGyrotron/State_WaitHVON_PREP.cfg"
|
||||
|
||||
#include "JAGyrotron/State_WaitHVON_SDN_PREP.cfg"
|
||||
|
||||
#include "JAGyrotron/State_Error.cfg"
|
||||
|
||||
}
|
||||
+Scheduler = {
|
||||
Class = GAMScheduler
|
||||
TimingDataSource = Timings
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
// LoggerService node: See /var/log/messages file.
|
||||
// +LoggerService = {
|
||||
// Class = LoggerService
|
||||
// CPUs = 0x8000
|
||||
// StackSize = 32768
|
||||
// NumberOfLogPages = 128
|
||||
// +SysLogger = {
|
||||
// Class = SysLogger
|
||||
// Format = "EtOoFmC"
|
||||
// PrintKeys = 1
|
||||
// Ident = "JAGyA"
|
||||
// }
|
||||
// Class = LoggerService
|
||||
// CPUs = 0x8000
|
||||
// StackSize = 32768
|
||||
// NumberOfLogPages = 128
|
||||
// +SysLogger = {
|
||||
// Class = SysLogger
|
||||
// Format = "EtOoFmC"
|
||||
// PrintKeys = 1
|
||||
// Ident = "JAGyA"
|
||||
// }
|
||||
// }
|
||||
|
||||
// StateMachine node
|
||||
@@ -1695,8 +1695,8 @@
|
||||
Type = uint32
|
||||
}
|
||||
HVInjection = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint32
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
@@ -2301,63 +2301,6 @@
|
||||
Function = GoError
|
||||
}
|
||||
}
|
||||
+GoErrorFromWaitHVON_SDNGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = OR
|
||||
//ExpectedIntValues = {1 1 1 1 1 1 1 1 1 1 0}
|
||||
ExpectedIntValues = {1 1 1 1 1 1 1 1 1 1}
|
||||
InputSignals = {
|
||||
GYA_APS_FLT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
GYB_APS_FLT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
GYB_BPS_FLT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
MIS_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
MISB_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
//SDN_Connection = {
|
||||
// DataSource = DDB1
|
||||
// Type = uint32
|
||||
//}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoError
|
||||
}
|
||||
}
|
||||
// Reset HVPS outputs. ToDo: Fix to access NI d.s.
|
||||
+ResetPSsGAM = {
|
||||
Class = ConstantGAM
|
||||
@@ -2456,24 +2399,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+SDNCommandGAM2 = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
Command = {
|
||||
DataSource = SDNSubCommands2
|
||||
Type = uint16
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 64
|
||||
Ranges = {{0 0}}
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Command2 = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint16
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+SDNReplyGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
@@ -2686,21 +2612,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+SDNTimeCompareGAM = { // for "Validation" functionality
|
||||
Class = JAESDNTimeCompareGAM
|
||||
InputSignals = {
|
||||
ESDNTime = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
SDN_Connection = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
//Write SDN waveform data into PS setpoint PV.
|
||||
|
||||
// Timer for SDN thread.
|
||||
+TimeSDNGAM = {
|
||||
@@ -2713,8 +2625,12 @@
|
||||
Counter = {
|
||||
DataSource = TimerSDN
|
||||
Type = uint32
|
||||
//Frequency = 1000 //operation:1k(=1ms cyc), debug:10
|
||||
Frequency = 900 //TimeCompareGAM for validation function properly work at 900Hz for QST ECPC
|
||||
Frequency = 1000 //operation:1k(=1ms cyc), debug:10
|
||||
}
|
||||
RTThreadPerf = {
|
||||
DataSource = Timings
|
||||
Alias = "WaitHVON.Thread3_CycleTime"
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
@@ -2726,6 +2642,10 @@
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
RTThreadPerfSDN = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2740,8 +2660,7 @@
|
||||
Counter = {
|
||||
DataSource = Timer
|
||||
Type = uint32
|
||||
Frequency = 10000
|
||||
//Frequency = 100000 //operation:100k(=10us cyc), debug:10
|
||||
Frequency = 200000 //operation:100k(=10us cyc), debug:10
|
||||
}
|
||||
RTThreadPerf = {
|
||||
DataSource = Timings
|
||||
@@ -3160,8 +3079,8 @@
|
||||
Type = uint32
|
||||
}
|
||||
StopRequest = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
MODE_SHOTLEN_FLAG = {
|
||||
DataSource = DDB1
|
||||
@@ -3298,8 +3217,8 @@
|
||||
Type = uint32
|
||||
}
|
||||
StopRequest = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
MODE_SHOTLEN_FLAG = {
|
||||
DataSource = DDB1
|
||||
@@ -3309,14 +3228,6 @@
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint16
|
||||
}
|
||||
Command2 = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint16
|
||||
}
|
||||
ESDNStatus = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint8
|
||||
}
|
||||
|
||||
}
|
||||
OutputSignals = {
|
||||
@@ -3353,37 +3264,6 @@
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint32
|
||||
}
|
||||
//Added 20210603
|
||||
APS_HVON = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint32
|
||||
}
|
||||
APS_SWON = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint32
|
||||
}
|
||||
BPS_HVON = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint32
|
||||
}
|
||||
BPS_SWON = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint32
|
||||
}
|
||||
MHVPS_HVON = {
|
||||
DataSource = RealTimeThreadAsyncBridge
|
||||
Type = uint32
|
||||
}
|
||||
NI6528P3Value = {
|
||||
DataSource = NI6528P3
|
||||
//DataSource = DDB1
|
||||
Type = uint8
|
||||
}
|
||||
NI6528P4GYAValue = {
|
||||
DataSource = NI6528P4GYA
|
||||
//DataSource = DDB1
|
||||
Type = uint8
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3616,11 +3496,8 @@
|
||||
}
|
||||
// for data exechange between threads.
|
||||
+RealTimeThreadAsyncBridge = {
|
||||
//Class = RealTimeThreadAsyncBridge
|
||||
//NumberOfBuffers = 20
|
||||
NumberOfBuffers = 64
|
||||
Class = GAMDataSource
|
||||
AllowNoProducers = 1
|
||||
Class = RealTimeThreadAsyncBridge
|
||||
NumberOfBuffers = 20
|
||||
}
|
||||
// for access ECPIS PV.
|
||||
+EPICSCAInput = {
|
||||
@@ -4278,27 +4155,27 @@
|
||||
}
|
||||
//PXI Board status PVs
|
||||
PXI6259_0 = {
|
||||
PVName = "EC-GN-P01-HWCF:6259-0-STATUS"
|
||||
PVName = "EC-GN-HWCF:6259-0-STATUS"
|
||||
Type = uint32
|
||||
}
|
||||
PXI6259_1 = {
|
||||
PVName = "EC-GN-P01-HWCF:6259-1-STATUS"
|
||||
PVName = "EC-GN-HWCF:6259-1-STATUS"
|
||||
Type = uint32
|
||||
}
|
||||
PXI6528_0 = {
|
||||
PVName = "EC-GN-P01-HWCF:6528-0-STATUS"
|
||||
PVName = "EC-GN-HWCF:6528-0-STATUS"
|
||||
Type = uint32
|
||||
}
|
||||
PXI6528_1 = {
|
||||
PVName = "EC-GN-P01-HWCF:6528-1-STATUS"
|
||||
PVName = "EC-GN-HWCF:6528-1-STATUS"
|
||||
Type = uint32
|
||||
}
|
||||
PXI6368_0 = {
|
||||
PVName = "EC-GN-P01-HWCF:6368-0-STATUS"
|
||||
PVName = "EC-GN-HWCF:6368-0-STATUS"
|
||||
Type = uint32
|
||||
}
|
||||
PXI6368_1 = {
|
||||
PVName = "EC-GN-P01-HWCF:6368-1-STATUS"
|
||||
PVName = "EC-GN-HWCF:6368-1-STATUS"
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
@@ -4530,51 +4407,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+SDNSubCommands2 = {
|
||||
Class = SDN::SDNSubscriber
|
||||
Topic = ECPC2SCUJA2
|
||||
Interface = enp27s0f0
|
||||
CPUs = 0x2000
|
||||
Locked = 1
|
||||
Timeout = 2
|
||||
Signals = {
|
||||
Header = {
|
||||
Type = uint8
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 48
|
||||
}
|
||||
ESDNHeaderVersionId = {
|
||||
Type = uint8
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 1
|
||||
}
|
||||
ESDNHeaderSize = {
|
||||
Type = uint8
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 1
|
||||
}
|
||||
ESDNStatus = {
|
||||
Type = uint8
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 1
|
||||
}
|
||||
ESDNDoNotUse = {
|
||||
Type = uint8
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 1
|
||||
}
|
||||
ESDNTime = {
|
||||
Type = uint32
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 1
|
||||
}
|
||||
Command = {
|
||||
Type = uint16
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 64
|
||||
}
|
||||
}
|
||||
}
|
||||
+SDNReply = {
|
||||
Class = SDN::SDNPublisher
|
||||
//Topic = SCUJAB2ECPC
|
||||
@@ -4878,7 +4710,7 @@
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
@@ -4899,12 +4731,12 @@
|
||||
Class = RealTimeThread
|
||||
Functions = {Timer1kHzGAM CCPSWaveformGAM FHPSSetpointGAM FHPSRampupGAM InWaitStandbyGAM
|
||||
choiseGAM MCPSGAM GCPSGAM EPICSOutputGAM PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
|
||||
GoDisabledGAM GoWaitReadyGAM GoErrorGAM }
|
||||
GoDisabledGAM GoWaitReadyGAM GoErrorGAM CCPSWaveformGAM }
|
||||
CPUs = 0x1000
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
@@ -4930,7 +4762,7 @@
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
@@ -4956,7 +4788,7 @@
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
@@ -4986,7 +4818,7 @@
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
@@ -5008,19 +4840,19 @@
|
||||
choiseGAM EPICSOutputGAM PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
|
||||
writeBeamONStateGAM writeHVArmedStateGAM writeHVInjectionStateGAM writeRFONStateGAM
|
||||
writeBeamONTimeGAM writeRFONTimeGAM
|
||||
FromWaitHVONToWaitStandby FromWaitHVONToWaitPermit GoErrorFromWaitHVON_SDNGAM }
|
||||
FromWaitHVONToWaitStandby FromWaitHVONToWaitPermit GoErrorGAM }
|
||||
CPUs = 0x1000
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {Timer100kHzGAM GAMEPICSCA StopRequestGAM ModeLimitGAM
|
||||
NI6528P3GAM NI6528P4GAM NI6528P4GYAGAM NI6528P4PV2PortGAM NI6528P4WriteGAM
|
||||
GAMSDNRealTimeStateMachine NI6528P5GAM NI6528P5PV2PortGAM}
|
||||
GAMSDNRealTimeStateMachine terminalInterfaceGAM NI6528P5GAM NI6528P5PV2PortGAM}
|
||||
CPUs = 0x4000
|
||||
}
|
||||
}
|
||||
@@ -5040,7 +4872,7 @@
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
@@ -5067,14 +4899,14 @@
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {Timer100kHzGAM GAMEPICSCA StopRequestGAM ModeLimitGAM
|
||||
NI6528P3GAM NI6528P4GAM NI6528P4GYAGAM NI6528P4PV2PortGAM NI6528P4WriteGAM
|
||||
GAMSDNRealTimeStateMachine NI6528P5GAM NI6528P5PV2PortGAM}
|
||||
GAMSDNRealTimeStateMachine terminalInterfaceGAM NI6528P5GAM NI6528P5PV2PortGAM}
|
||||
CPUs = 0x4000
|
||||
}
|
||||
}
|
||||
@@ -5088,12 +4920,12 @@
|
||||
Class = RealTimeThread
|
||||
Functions = {Timer1kHzGAM InErrorGAM PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
|
||||
ExitedHVArmedInjectionRFONGAM ResetPSsGAM
|
||||
FromErrorToWaitStandbyGAM ErrorGAM choiseGAM EPICSOutputGAM FHPSSetpointGAM FHPSRampupGAM CCPSWaveformGAM }
|
||||
FromErrorToWaitStandbyGAM ErrorGAM choiseGAM EPICSOutputGAM FHPSSetpointGAM FHPSRampupGAM CCPSWaveformGAM}
|
||||
CPUs = 0x1000
|
||||
}
|
||||
+Thread2 = {
|
||||
Class = RealTimeThread
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNCommandGAM2 SDNReplyGAM SDNTimeCompareGAM }
|
||||
Functions = {TimeSDNGAM SDNCommandGAM SDNReplyGAM}
|
||||
CPUs = 0x2000
|
||||
}
|
||||
+Thread3 = {
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@@ -0,0 +1,99 @@
|
||||
#package jada_gyro
|
||||
|
||||
|
||||
+WebRoot = {
|
||||
Class = HttpObjectBrowser
|
||||
Root = "."
|
||||
+ObjectBrowse = {
|
||||
Class = HttpObjectBrowser
|
||||
Root = "/"
|
||||
}
|
||||
+ResourcesHtml = {
|
||||
Class = HttpDirectoryResource
|
||||
BaseDir = "/opt/marte2-core/Resources/HTTP"
|
||||
}
|
||||
+Monitor = {
|
||||
Class = HttpDataMonitor
|
||||
Plot0 = {
|
||||
APS_HVON = {
|
||||
Component = RTApp.Data.DDB3
|
||||
Signal = "Signals.APS_HVON"
|
||||
}
|
||||
APS_SWON = {
|
||||
Component = RTApp.Data.DDB3
|
||||
Signal = "Signals.APS_SWON"
|
||||
}
|
||||
BPS_HVON = {
|
||||
Component = RTApp.Data.DDB3
|
||||
Signal = "Signals.BPS_HVON"
|
||||
}
|
||||
BPS_SWON = {
|
||||
Component = RTApp.Data.DDB3
|
||||
Signal = "Signals.BPS_SWON"
|
||||
}
|
||||
HVPS_HVON = {
|
||||
Component = RTApp.Data.DDB3
|
||||
Signal = "Signals.MHVPS_HVON"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+WebServer = {
|
||||
Class = HttpService
|
||||
Port = 8084
|
||||
WebRoot = WebRoot
|
||||
Timeout = 0
|
||||
ListenMaxConnections = 255
|
||||
AcceptTimeout = 1000
|
||||
MaxNumberOfThreads = 8
|
||||
MinNumberOfThreads = 1
|
||||
}
|
||||
|
||||
//# Main Operational State Machine
|
||||
+StateMachine = {
|
||||
Class = StateMachine
|
||||
}
|
||||
|
||||
//# MARTe RealTime Application
|
||||
+RTApp = {
|
||||
Class = RealTimeApplication
|
||||
+Data = {
|
||||
Class = ReferenceContainer
|
||||
DefaultDataSource = DDB1
|
||||
//# GAM Datasource for Thread 1
|
||||
+DDB1 = {
|
||||
Class = GAMDataSource
|
||||
AllowNoProducers = 1
|
||||
ResetUnusedVariablesAtStateChange = 0
|
||||
}
|
||||
//# GAMDatasource for thread 2
|
||||
+DDB2 = {
|
||||
Class = GAMDataSource
|
||||
AllowNoProducers = 1
|
||||
ResetUnusedVariablesAtStateChange = 0
|
||||
}
|
||||
//# GAMDatasource for thread 3
|
||||
+DDB3 = {
|
||||
Class = GAMDataSource
|
||||
AllowNoProducers = 1
|
||||
ResetUnusedVariablesAtStateChange = 0
|
||||
}
|
||||
+DDB6 = {
|
||||
Class = GAMDataSource
|
||||
}
|
||||
+Timings = {
|
||||
Class = TimingDataSource
|
||||
}
|
||||
}
|
||||
+Functions = {
|
||||
Class = ReferenceContainer
|
||||
}
|
||||
+States = {
|
||||
Class = ReferenceContainer
|
||||
}
|
||||
+Scheduler = {
|
||||
Class = GAMScheduler
|
||||
TimingDataSource = Timings
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,632 @@
|
||||
#package jada_gyro.RTApp.States
|
||||
|
||||
|
||||
+Disabled = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_epics
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
MCPSGAM,
|
||||
PXIErrorGAM,
|
||||
GoErrorGAM,
|
||||
GoWaitStandbyGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_sdn
|
||||
Functions = {
|
||||
TimeSDNGAM,
|
||||
SDNCommandGAM,
|
||||
SDNReplyGAM
|
||||
}
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_rt
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
HVPSsOffGAM,
|
||||
NI6528_0_WriterGAM,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_adc
|
||||
Functions = {
|
||||
ReadADC,
|
||||
PushADCtoDAN,
|
||||
PushADCtoEpics
|
||||
}
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_dan
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+WaitStandby = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
MCPSGAM,
|
||||
PXIErrorGAM,
|
||||
GoDisabledGAM,
|
||||
GoWaitReadyGAM,
|
||||
GoErrorGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
CPUs = @cpus_epics
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
TimeSDNGAM,
|
||||
SDNCommandGAM,
|
||||
SDNReplyGAM
|
||||
}
|
||||
CPUs = @cpus_sdn
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
HVPSsOffGAM,
|
||||
NI6528_0_WriterGAM,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
CPUs = @cpus_rt
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
ReadADC,
|
||||
PushADCtoDAN,
|
||||
PushADCtoEpics
|
||||
}
|
||||
CPUs = @cpus_adc
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
CPUs = @cpus_dan
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSSetpointGAM,
|
||||
FHPSRampupGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+WaitReady = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
WFRecordGAM,
|
||||
PreProgrammedGAM,
|
||||
PXIErrorGAM,
|
||||
GoWaitPermitGAM,
|
||||
GoWaitStandbyFromReadyGAM,
|
||||
GoErrorGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
CPUs = @cpus_epics
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
TimeSDNGAM,
|
||||
SDNCommandGAM,
|
||||
SDNReplyGAM
|
||||
}
|
||||
CPUs = @cpus_sdn
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
HVPSsOffGAM,
|
||||
NI6528_0_WriterGAM,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
CPUs = @cpus_rt
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
ReadADC,
|
||||
PushADCtoDAN,
|
||||
PushADCtoEpics
|
||||
}
|
||||
CPUs = @cpus_adc
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
CPUs = @cpus_dan
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSSetpointGAM,
|
||||
FHPSRampupGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+WaitPermit = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
WFRecordGAM,
|
||||
PreProgrammedGAM,
|
||||
PXIErrorGAM,
|
||||
GoWaitReadyFromWaitPermitGAM,
|
||||
GoWaitHVONGAM,
|
||||
GoWaitHVON_PREP_GAM,
|
||||
GoWaitHVON_SDN_GAM,
|
||||
GoWaitHVON_SDN_PREP_GAM,
|
||||
GoErrorHVGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
CPUs = @cpus_epics
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
TimeSDNGAM,
|
||||
SDNCommandGAM,
|
||||
SDNReplyGAM
|
||||
}
|
||||
CPUs = @cpus_sdn
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
HVPSsOffGAM,
|
||||
NI6528_0_WriterGAM,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
CPUs = @cpus_rt
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
ReadADC,
|
||||
PushADCtoDAN,
|
||||
PushADCtoEpics
|
||||
}
|
||||
CPUs = @cpus_adc
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
CPUs = @cpus_dan
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSSetpointGAM,
|
||||
FHPSRampupGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Real-Time state for HVPS sequence timing control.
|
||||
+WaitHVON = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
PXIErrorGAM,
|
||||
FromWaitHVONToWaitStandby,
|
||||
FromWaitHVONToWaitPermit,
|
||||
GoErrorHVGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
CPUs = @cpus_epics
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { TimeSDNGAM, SDNCommandGAM, SDNReplyGAM }
|
||||
CPUs = @cpus_sdn
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
FastEpicsInputGAM,
|
||||
FastStopRequestGAM,
|
||||
ModeLimitGAM,
|
||||
GAMRealTimeStateMachine,
|
||||
NI6528_0_WriterGAM,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
CPUs = @cpus_rt
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
ReadADC,
|
||||
PushADCtoDAN,
|
||||
PushADCtoEpics
|
||||
}
|
||||
CPUs = @cpus_adc
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
CPUs = @cpus_dan
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSSetpointGAM,
|
||||
FHPSRampupGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+WaitHVON_SDN = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
PXIErrorGAM,
|
||||
FromWaitHVONToWaitStandby,
|
||||
FromWaitHVONToWaitPermit,
|
||||
GoErrorHVGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
CPUs = @cpus_epics
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
TimeSDNGAM,
|
||||
SDNCommandGAM,
|
||||
SDNReplyGAM
|
||||
}
|
||||
CPUs = @cpus_sdn
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
FastEpicsInputGAM,
|
||||
FastStopRequestGAM,
|
||||
ModeLimitGAM,
|
||||
GAMSDNRealTimeStateMachine,
|
||||
NI6528_0_WriterGAM,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
CPUs = @cpus_rt
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
ReadADC,
|
||||
PushADCtoDAN,
|
||||
PushADCtoEpics
|
||||
}
|
||||
CPUs = @cpus_adc
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
CPUs = @cpus_dan
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSRampupGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+WaitHVON_PREP = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
PreProgrammedGAM,
|
||||
PXIErrorGAM,
|
||||
FromWaitHVONToWaitStandby,
|
||||
FromWaitHVONToWaitPermit,
|
||||
GoErrorHVGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
CPUs = @cpus_epics
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { TimeSDNGAM, SDNCommandGAM, SDNReplyGAM }
|
||||
CPUs = @cpus_sdn
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
FastEpicsInputGAM,
|
||||
FastStopRequestGAM,
|
||||
ModeLimitGAM,
|
||||
GAMRealTimeStateMachine,
|
||||
NI6528_0_WriterGAM,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
CPUs = @cpus_rt
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { ReadADC, PushADCtoDAN, PushADCtoEpics }
|
||||
CPUs = @cpus_adc
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
CPUs = @cpus_dan
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSRampupGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+WaitHVON_SDN_PREP = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
PreProgrammedGAM,
|
||||
PXIErrorGAM,
|
||||
FromWaitHVONToWaitStandby,
|
||||
FromWaitHVONToWaitPermit,
|
||||
GoErrorHVGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
CPUs = @cpus_epics
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
TimeSDNGAM,
|
||||
SDNCommandGAM,
|
||||
SDNReplyGAM
|
||||
}
|
||||
CPUs = @cpus_sdn
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
FastEpicsInputGAM,
|
||||
FastStopRequestGAM,
|
||||
ModeLimitGAM,
|
||||
GAMSDNRealTimeStateMachine,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
CPUs = @cpus_rt
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { ReadADC, PushADCtoDAN, PushADCtoEpics }
|
||||
CPUs = @cpus_adc
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
CPUs = @cpus_dan
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSRampupGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Error = {
|
||||
Class = RealTimeState
|
||||
+Threads = {
|
||||
Class = ReferenceContainer
|
||||
+EPICSThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
SyncThreadConsumerGAM,
|
||||
DecimateGAM,
|
||||
StateGAM,
|
||||
PXIErrorGAM,
|
||||
ResetErrorGAM,
|
||||
ChoiceGAM,
|
||||
EPICSThSyncGAM,
|
||||
EPICSOutputGAM
|
||||
}
|
||||
// REMOVED: GoErrorGAM (redundant), FHPSSetPointGAM and FHPSRumpUpGAM
|
||||
// TODO: Discus about the removal
|
||||
CPUs = @cpus_epics
|
||||
}
|
||||
+SDNThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
TimeSDNGAM,
|
||||
SDNCommandGAM,
|
||||
SDNReplyGAM
|
||||
}
|
||||
CPUs = @cpus_sdn
|
||||
}
|
||||
+RealTimeThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
FastTimerGAM,
|
||||
NI6528_0_ReaderGAM,
|
||||
AsyncIOGAM,
|
||||
HVPSsOffGAM,
|
||||
NI6528_0_WriterGAM,
|
||||
SyncThreadProducerGAM
|
||||
}
|
||||
CPUs = @cpus_rt
|
||||
}
|
||||
+ADCThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = {
|
||||
ReadADC,
|
||||
PushADCtoDAN,
|
||||
PushADCtoEpics
|
||||
}
|
||||
CPUs = @cpus_adc
|
||||
}
|
||||
+DANThread = {
|
||||
Class = RealTimeThread
|
||||
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
|
||||
CPUs = @cpus_dan
|
||||
}
|
||||
+ReferenceGenerationThread = {
|
||||
Class = RealTimeThread
|
||||
CPUs = @cpus_wg
|
||||
Functions = {
|
||||
WGTimerGAM,
|
||||
CCPSWaveformGAM,
|
||||
FHPSStateGAM,
|
||||
FHPSGainGAM,
|
||||
WGProducerGAM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,512 @@
|
||||
#package jada_gyro.RTApp.Data
|
||||
|
||||
|
||||
+EPICSCAInput = {
|
||||
Class = "EPICSCA::EPICSCAInput"
|
||||
Signals = {
|
||||
TRIGGER_DAN = {
|
||||
PVName = (@rfid .. ":DAN_ENABLED")
|
||||
Type = uint8
|
||||
}
|
||||
CSV_LOAD = {
|
||||
PVName = (@rfid .. "-GAF:STAT-CSV-LOAD")
|
||||
Type = uint32
|
||||
}
|
||||
CSV_NAME = {
|
||||
PVName = (@rfid .. "-GAF:STAT-CSV-NAME")
|
||||
Type = char8
|
||||
NumberOfElements = 40
|
||||
}
|
||||
MIS_ITL = {
|
||||
Type = uint32
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-YTRP")
|
||||
}
|
||||
RESET_FLT = {
|
||||
PVName = (@rfid .. "-GPF:STAT-RST-FLT")
|
||||
Type = uint32
|
||||
}
|
||||
PLC_SELECT = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-CON-OPGY1")
|
||||
Type = uint32
|
||||
}
|
||||
CCPS_OUTPUT_FREQ = {
|
||||
PVName = (@rfid .. "-GAF-CCPS:STAT-FREQ")
|
||||
Type = float32
|
||||
}
|
||||
CCPS_OUTPUT_AMP = {
|
||||
PVName = (@rfid .. "-GAF-CCPS:STAT-AMP")
|
||||
Type = float32
|
||||
}
|
||||
CCPS_OUTPUT_OFFS = {
|
||||
PVName = (@rfid .. "-GAF-CCPS:STAT-OFFS")
|
||||
Type = float32
|
||||
}
|
||||
GCPS_TRG_CURR_MANUAL = {
|
||||
PVName = (@rfid .. "-GAF-GCPS:PSU2130-TRG-CURR-SET-MI")
|
||||
Type = float32
|
||||
}
|
||||
MCPS_TRG_CURR_MANUAL = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:PSU2120-TRG-CURR-SET-MI")
|
||||
Type = float32
|
||||
}
|
||||
MCPS_RU_COMPLETED = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:PSU2120-YTS-RUP")
|
||||
Type = uint8
|
||||
}
|
||||
MCPS_RD_COMPLETED = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:PSU2120-YTS-RDOWN")
|
||||
Type = uint8
|
||||
}
|
||||
BPS_MANUAL = {
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-EREF-MSP")
|
||||
Type = float32
|
||||
}
|
||||
BPS_MM = {
|
||||
PVName = (@rfid .. "-PB1F:STAT-MANM")
|
||||
Type = uint32
|
||||
}
|
||||
APS_MANUAL = {
|
||||
PVName = (@rfid .. "-PA1F:PSU3000-EREF-MSP")
|
||||
Type = float32
|
||||
}
|
||||
APS_MM = {
|
||||
PVName = (@rfid .. "-PA1F:STAT-MANM")
|
||||
Type = uint32
|
||||
}
|
||||
MHVPS_MANUAL = {
|
||||
PVName = (@rfid .. "-PMF:PSU0000-EREF-MSP")
|
||||
Type = float32
|
||||
}
|
||||
MHVPS_MM = {
|
||||
PVName = (@rfid .. "-PMF:STAT-MANM")
|
||||
Type = uint32
|
||||
}
|
||||
MCPS_MM = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:STAT-MANM")
|
||||
Type = uint32
|
||||
}
|
||||
GCPS_MM = {
|
||||
PVName = (@rfid .. "-GAF-GCPS:STAT-MANM")
|
||||
Type = uint32
|
||||
}
|
||||
FHPS_AUTO_TAGV = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:PSU2610-AUTO-TAGV")
|
||||
Type = float32
|
||||
}
|
||||
FHPS_AUTO_TIME = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:PSU2610-AUTO-RU-TIME")
|
||||
Type = float32
|
||||
}
|
||||
FHPS_AUTO_START = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:PSU2610-AUTO-START")
|
||||
Type = uint32
|
||||
}
|
||||
FHPS_MANM = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:STAT-MANM")
|
||||
Type = uint32
|
||||
}
|
||||
//# Guncoil state readback
|
||||
GCPS_ACT_RB = {
|
||||
PVName = (@rfid .. "-GAF-GCPS:PSU2130-ACT-RB")
|
||||
Type = uint32
|
||||
}
|
||||
//# Guncoil current monitor
|
||||
GCPS_CURR_MON = {
|
||||
PVName = (@rfid .. "-GAF-GCPS:PSU2130-CURR-MON")
|
||||
Type = float32
|
||||
}
|
||||
//# Main coil state readback
|
||||
MCPS_ACT_RB = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:PSU2120-ACT-RB")
|
||||
Type = uint32
|
||||
}
|
||||
//# Main coil current monitor
|
||||
MCPS_CURR_MON = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:PSU2120-CURR-MON")
|
||||
Type = float32
|
||||
}
|
||||
//# Pre-program flag
|
||||
PREP_MODE = {
|
||||
PVName = (@rfid .. "-GAF:STAT-PREP-MODE")
|
||||
Type = uint32
|
||||
}
|
||||
// Timing settings
|
||||
MHVPS_DT = {
|
||||
PVName = (@rfid .. "-PMF:STAT-DT-HVON")
|
||||
Type = uint32
|
||||
}
|
||||
APS_HVON_DT = {
|
||||
PVName = (@rfid .. "-PA1F:STAT-DT-HVON")
|
||||
Type = uint32
|
||||
}
|
||||
APS_SWON_DT = {
|
||||
PVName = (@rfid .. "-PA1F:STAT-DT-SWON")
|
||||
Type = uint32
|
||||
}
|
||||
BPS_HVON_DT = {
|
||||
PVName = (@rfid .. "-PB1F:STAT-DT-HVON")
|
||||
Type = uint32
|
||||
}
|
||||
BPS_SWON_DT = {
|
||||
PVName = (@rfid .. "-PB1F:STAT-DT-SWON")
|
||||
Type = uint32
|
||||
}
|
||||
SHOTLEN = {
|
||||
PVName = (@rfid .. "-GAF:STAT-DT-SHOTLEN")
|
||||
Type = uint32
|
||||
}
|
||||
PLC_MODE1 = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YTS-MD1")
|
||||
Type = uint32
|
||||
}
|
||||
PLC_MODE2 = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YTS-MD2")
|
||||
Type = uint32
|
||||
}
|
||||
PLC_MODE3 = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YTS-MD3")
|
||||
Type = uint32
|
||||
}
|
||||
PLC_MODE4 = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YTS-MD4")
|
||||
Type = uint32
|
||||
}
|
||||
MD1_SHOTLEN_LIM = {
|
||||
PVName = (@rfid .. "-GPF:STAT-MD1-LIM")
|
||||
Type = uint32
|
||||
}
|
||||
MD2_SHOTLEN_LIM = {
|
||||
PVName = (@rfid .. "-GPF:STAT-MD2-LIM")
|
||||
Type = uint32
|
||||
}
|
||||
MD3_SHOTLEN_LIM = {
|
||||
PVName = (@rfid .. "-GPF:STAT-MD3-LIM")
|
||||
Type = uint32
|
||||
}
|
||||
MD4_SHOTLEN_LIM = {
|
||||
PVName = (@rfid .. "-GPF:STAT-MD4-LIM")
|
||||
Type = uint32
|
||||
}
|
||||
GY_MCPS_CURR_MON = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:PSU2120-CURR-MON")
|
||||
Type = float32
|
||||
}
|
||||
GY_GCPS_CURR_MON = {
|
||||
PVName = (@rfid .. "-GAF-GCPS:PSU2130-CURR-MON")
|
||||
Type = float32
|
||||
}
|
||||
GY_FHPS_MEAS_ACI = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:PSU2610-MEAS-ACI")
|
||||
Type = float32
|
||||
}
|
||||
GY_FHPS_MEAS_ACV = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:PSU2610-MEAS-ACV")
|
||||
Type = float32
|
||||
}
|
||||
GY_CCPS_MEAS_DCI = {
|
||||
PVName = (@rfid .. "-GAF-CCPS:PSU2320-MEAS-DCI")
|
||||
Type = float32
|
||||
}
|
||||
SHORT_PULSE_MODE = {
|
||||
PVName = (@rfid .. "-GAF:STAT-SHORT-PULSE")
|
||||
Type = uint32
|
||||
}
|
||||
CCPS_IN_OPERATION = {
|
||||
PVName = (@rfid .. "-GAF-CCPS:PSU2320-TR")
|
||||
Type = uint8
|
||||
}
|
||||
}
|
||||
}
|
||||
+EPICSCAOutput = {
|
||||
Class = EPICSCAOutput
|
||||
CPUMask = @cpus_epics // change from 0x200
|
||||
StackSize = 10000000
|
||||
NumberOfBuffers = 50
|
||||
Signals = {
|
||||
PCF_STATE = {
|
||||
PVName = (@rfid .. "-GAF:STAT-SM")
|
||||
Type = uint32
|
||||
}
|
||||
// Analog Output PVs in Variables-signal tab.
|
||||
FHPS_REF = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:PSU2610-EREF")
|
||||
Type = float32
|
||||
}
|
||||
BPS_REF = {
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-EREF")
|
||||
Type = float32
|
||||
}
|
||||
APS_REF = {
|
||||
PVName = (@rfid .. "-PA1F:STAT-EREF-CONV.A")
|
||||
// TODO: PSU3000-YSTA
|
||||
Type = float32
|
||||
}
|
||||
MHVPS_REF = {
|
||||
PVName = (@rfid .. "-PMF:STAT-EREF-CALC.A")
|
||||
Type = float32
|
||||
}
|
||||
// Digital Output PVs in Variables-signal tab.
|
||||
APS_STOP = {
|
||||
PVName = (@rfid .. "-PA1F:PSU3000-CTRP")
|
||||
Type = uint32
|
||||
}
|
||||
BPS_STOP = {
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-CTRP")
|
||||
Type = uint32
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-YSTA-GAOP")
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_STOP = {
|
||||
PVName = (@rfid .. "-PMF:PSU0000-COFF")
|
||||
Type = uint32
|
||||
}
|
||||
PCF_FLT = {
|
||||
PVName = (@rfid .. "-GPF:PCF4210-CTRP")
|
||||
Type = uint8
|
||||
}
|
||||
PXI_FLT = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-RV2")
|
||||
Type = uint8
|
||||
}
|
||||
HVARMED = {
|
||||
PVName = (@rfid .. "-GPF:PCF4210-YTS-GA1")
|
||||
Type = uint8
|
||||
}
|
||||
HVINJECTION = {
|
||||
PVName = (@rfid .. "-GPF:PCF4210-YTS-GA2")
|
||||
Type = uint8
|
||||
}
|
||||
RFON = {
|
||||
PVName = (@rfid .. "-GPF:PCF4210-YTS-GA3")
|
||||
Type = uint8
|
||||
}
|
||||
// Output PVs in Variables-operation tab.
|
||||
MHVPS_PREP_WF = {
|
||||
PVName = (@rfid .. "-PMF:STAT-PREP-WF")
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
BPS_PREP_WF = {
|
||||
PVName = (@rfid .. "-PB1F:STAT-PREP-WF")
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
APS_PREP_WF = {
|
||||
PVName = (@rfid .. "-PA1F:STAT-PREP-WF")
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
FHPS_PREP_WF = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:STAT-PREP-WF")
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
MCPS_PREP_WF = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:STAT-PREP-WF")
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
GCPS_PREP_WF = {
|
||||
PVName = (@rfid .. "-GAF-GCPS:STAT-PREP-WF")
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PREP_TIME_WF = {
|
||||
PVName = (@rfid .. "-GAF:STAT-PREP-TIME-WF")
|
||||
Type = int32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
PVName = (@rfid .. "-GAF:STAT-BEAMON-TIME")
|
||||
Type = uint32
|
||||
}
|
||||
ELAPSED_TIME = {
|
||||
PVName = (@rfid .. "-GAF:STAT-ELAPSED")
|
||||
Type = uint32
|
||||
}
|
||||
SHOT_ID = {
|
||||
PVName = (@rfid .. "-GAF:STAT-SHOT-ID")
|
||||
Type = uint32
|
||||
}
|
||||
CSV_LOADED = {
|
||||
PVName = (@rfid .. "-GAF:STAT-CSV-LOADED")
|
||||
Type = uint32
|
||||
}
|
||||
CSV_ERR = {
|
||||
PVName = (@rfid .. "-GAF:STAT-CSV-ERR")
|
||||
Type = uint32
|
||||
}
|
||||
// Output PVs in Variables-jastec tab.
|
||||
MCPS_TRG_CURR_SET = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:PSU2120-TRG-CURR-SET-MO")
|
||||
Type = float32
|
||||
}
|
||||
MCPS_ACT_SP = {
|
||||
PVName = (@rfid .. "-GAF-MCPS:PSU2120-ACT-SP-MO")
|
||||
Type = uint32
|
||||
}
|
||||
GCPS_TRG_CURR_SET = {
|
||||
PVName = (@rfid .. "-GAF-GCPS:PSU2130-TRG-CURR-SET-MO")
|
||||
Type = float32
|
||||
}
|
||||
GCPS_ACT_SP = {
|
||||
PVName = (@rfid .. "-GAF-GCPS:PSU2130-ACT-SP-MO")
|
||||
Type = uint32
|
||||
}
|
||||
// Output PVs in Variables-kikusui tab.
|
||||
CCPS_REF = {
|
||||
PVName = (@rfid .. "-GAF-CCPS:PSU2320-EREF")
|
||||
Type = float32
|
||||
}
|
||||
FHPS_AUTO_STAT = {
|
||||
PVName = (@rfid .. "-GAF-FHPS:PSU2610-AUTO-STAT")
|
||||
Type = uint32
|
||||
}
|
||||
// Add 20201117
|
||||
APS_HVON = {
|
||||
PVName = (@rfid .. "-PA1F:PSU3000-CON-HV")
|
||||
Type = uint8
|
||||
}
|
||||
APS_SWON = {
|
||||
PVName = (@rfid .. "-PA1F:PSU3000-CON-SW")
|
||||
Type = uint8
|
||||
}
|
||||
BPS_HVON = {
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-CON-HV")
|
||||
Type = uint8
|
||||
}
|
||||
BPS_SWON = {
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-CON-SW")
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_HVON = {
|
||||
PVName = (@rfid .. "-PMF:STAT-HVON-CALC.A")
|
||||
Type = uint8
|
||||
}
|
||||
EXT_TRIGGER = {
|
||||
PVName = (@rfid .. "-GAF:DIO4900-YON")
|
||||
Type = uint8
|
||||
}
|
||||
ECPC_MHVPS_MOD = {
|
||||
PVName = (@rfid .. "-GPF:PSU0000-YSTA-MOD")
|
||||
Type = uint8
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-CON-GY1PRM")
|
||||
Type = uint8
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-CON-OPGY1")
|
||||
Type = uint8
|
||||
}
|
||||
CCPS_IN_OP = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YON-CCPS1")
|
||||
Type = uint8
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YSTA-MPSS")
|
||||
Type = uint8
|
||||
}
|
||||
PLC_ITL = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YTRP")
|
||||
Type = uint8
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YTS-ST1R")
|
||||
Type = uint8
|
||||
}
|
||||
PLC_READY = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YTS-ST2R")
|
||||
Type = uint8
|
||||
}
|
||||
PLC_ON = {
|
||||
PVName = (@rfid .. "-GPS:PLC4110-YTS-ST3R")
|
||||
Type = uint8
|
||||
}
|
||||
APS_FLT = {
|
||||
PVName = (@rfid .. "-PA1F:PSU3000-YFLT")
|
||||
Type = uint8
|
||||
}
|
||||
APS_READY = {
|
||||
PVName = (@rfid .. "-PA1F:PSU3000-YSTA")
|
||||
Type = uint8
|
||||
}
|
||||
BPS_FLT = {
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-YFLT")
|
||||
Type = uint8
|
||||
}
|
||||
BPS_READY = {
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-YSTA")
|
||||
Type = uint8
|
||||
}
|
||||
MHPS_FLT = {
|
||||
PVName = (@rfid .. "-PMF:PSU0000-YFLT")
|
||||
Type = uint8
|
||||
}
|
||||
MHPS_READY = {
|
||||
PVName = (@rfid .. "-PMF:PSU0000-TYSTA")
|
||||
Type = uint8
|
||||
}
|
||||
MHPS_OC = {
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-YFLT-OC")
|
||||
Type = uint8
|
||||
}
|
||||
MHPS_OV = {
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-YFLT-OV")
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
Type = uint8
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-RV1")
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
Type = uint8
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-RV2")
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
Type = uint8
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-RV3")
|
||||
}
|
||||
FAST_ITL = {
|
||||
Type = uint8
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-YTRP")
|
||||
}
|
||||
//! unused: Not shared with th1 (TODO)
|
||||
FAST_PAUSE = {
|
||||
Type = uint8
|
||||
PVName = (@rfid .. "-GAFP:FMC4310-YTRP2")
|
||||
}
|
||||
PXI_6259_STATE = {
|
||||
Type = uint32
|
||||
PVName = (@rfid .. "-HWCF:6259-0-STATUS")
|
||||
}
|
||||
//! unused: No 6683 DS (TODO)
|
||||
PXI_6683_STATE = {
|
||||
Type = uint8
|
||||
PVName = (@rfid .. "-HWCF:6683-0-STATUS")
|
||||
}
|
||||
//! unused: No 6683 DS (TODO)
|
||||
PXI_6683_SYNC = {
|
||||
Type = uint8
|
||||
PVName = (@rfid .. "-HWCF:6683-0-SYNC")
|
||||
}
|
||||
//! unused: No 6683 DS (TODO)
|
||||
PXI_6683_SYNCLOST = {
|
||||
Type = uint8
|
||||
PVName = (@rfid .. "-HWCF:6683-0-SYNCLOST")
|
||||
}
|
||||
PXI_6528_STATE = {
|
||||
Type = uint32
|
||||
PVName = (@rfid .. "-HWCF:6528-0-STATUS")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,580 @@
|
||||
#package jada_gyro.RTApp.Data
|
||||
|
||||
|
||||
+DDB1 = {
|
||||
Signals = {
|
||||
PXI6528_Status = {
|
||||
Type = uint32
|
||||
}
|
||||
PXI6259_Status = {
|
||||
Type = uint32
|
||||
}
|
||||
PXI6683_Status = {
|
||||
Type = uint8
|
||||
}
|
||||
PXI6683_PtpdStatus = {
|
||||
Type = uint8
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_OV = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_OC = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
ECPC_MOD = {
|
||||
Type = uint8
|
||||
}
|
||||
FAST_TRIP = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_ITL = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_ON = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
Type = uint8
|
||||
}
|
||||
TRIGGER = {
|
||||
Type = uint8
|
||||
}
|
||||
APS_HVON = {
|
||||
Type = uint8
|
||||
}
|
||||
APS_SWON = {
|
||||
Type = uint8
|
||||
}
|
||||
BPS_HVON = {
|
||||
Type = uint8
|
||||
}
|
||||
BPS_SWON = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_HVON = {
|
||||
Type = uint8
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
Type = uint8
|
||||
}
|
||||
HVARMED = {
|
||||
Type = uint8
|
||||
}
|
||||
HVINJECTION = {
|
||||
Type = uint8
|
||||
}
|
||||
RFON = {
|
||||
Type = uint8
|
||||
}
|
||||
ELAPSED_TIME = {
|
||||
Type = uint32
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
Type = uint32
|
||||
}
|
||||
SHOT_ID = {
|
||||
Type = uint32
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
Type = uint8
|
||||
}
|
||||
|
||||
PXI6259_Status_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint32
|
||||
}
|
||||
PXI6528_Status_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint32
|
||||
}
|
||||
PXI6683_Status_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PXI6683_PtpdStatus_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
GYA_APS_READY_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
GYA_APS_FLT_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
GYA_BPS_READY_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
GYA_BPS_FLT_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_OV_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_OC_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_FLT_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_READY_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
ECPC_MOD_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
FAST_TRIP_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PLC_ITL_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PLC_STANDBY_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PLC_READY_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PLC_ON_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PLC_PERMIT_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PLC_OP_SELECTED_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PLC_CC_OP_SELECTED_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
PLC_SYNCMODE_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
TRIGGER_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
BEAM_ON_STAT_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
HVARMED_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
HVINJECTION_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
RFON_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
ELAPSED_TIME_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint32
|
||||
}
|
||||
BEAM_ON_TIME_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint32
|
||||
}
|
||||
SHOT_ID_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint32
|
||||
}
|
||||
CRIO_RV1_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV2_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV3_SAMPLES = {
|
||||
NumberOfElements = @fast_slow_ratio
|
||||
Type = uint8
|
||||
}
|
||||
}
|
||||
}
|
||||
+DDB3 = {
|
||||
Signals = {
|
||||
SHOT_ID = {
|
||||
Type = uint32
|
||||
}
|
||||
//# DI.0
|
||||
GYA_APS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.1
|
||||
GYA_APS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.2
|
||||
GYA_BPS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.3
|
||||
GYA_BPS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.4
|
||||
MHVPS_OV = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.5
|
||||
MHVPS_OC = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.6
|
||||
MHVPS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.7
|
||||
MHVPS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.8
|
||||
ECPC_MOD = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.9
|
||||
FAST_TRIP = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI 11
|
||||
CRIO_RV1 = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI 12
|
||||
CRIO_RV2 = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI 13
|
||||
CRIO_RV3 = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.14
|
||||
PLC_ITL = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.15
|
||||
PLC_STANDBY = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.16
|
||||
PLC_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.17
|
||||
PLC_ON = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.18
|
||||
PLC_PERMIT = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.19
|
||||
PLC_OP_SELECTED = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.20
|
||||
PLC_CC_OP_SELECTED = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.21
|
||||
PLC_SYNCMODE = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.22
|
||||
TRIGGER = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DI.23
|
||||
NONE_DI23 = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.0
|
||||
APS_HVON = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.1
|
||||
APS_SWON = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.2
|
||||
APS_STOP = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.3
|
||||
BPS_HVON = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.4
|
||||
BPS_SWON = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.5
|
||||
BPS_STOP = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.6
|
||||
BEAM_ON_STAT = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.7 PCF -> CRIO
|
||||
DO_REV5 = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.8 PCF -> CRIO (PROTECTION PAUSE SIGNAL)
|
||||
DO_REV6 = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.9 PCF -> CRIO
|
||||
DO_REV7 = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.10 PCF -> CRIO
|
||||
DO_REV8 = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.11
|
||||
MHVPS_HVON = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.12
|
||||
MHVPS_STOP = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.13
|
||||
MHVPS_MODSW = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.14
|
||||
PCF_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.15
|
||||
HVARMED = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.16
|
||||
HVINJECTION = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.17
|
||||
RFON = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.18
|
||||
FHPS_RU = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.19
|
||||
SCM_RU = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.20
|
||||
SCM_RD = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.21
|
||||
CCPS_IN_OPERATION = {
|
||||
Type = uint8
|
||||
}
|
||||
//# DO.22
|
||||
PXI_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
//# Internal Fast Stop signal
|
||||
FAST_STOP = {
|
||||
Type = uint8
|
||||
}
|
||||
//# Computed Shot length flag
|
||||
MODE_SHOTLEN_FLAG = {
|
||||
Type = uint32
|
||||
}
|
||||
//# TODO: Document signal
|
||||
RTSMValue = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
//# PXI NI6528 Digital input datasource
|
||||
//# TODO: configure it
|
||||
+NI6528_0_DIO = {
|
||||
Class = NI6528
|
||||
DeviceName = "/dev/pxi6528"
|
||||
BoardId = 1 // TODO: check if not 1
|
||||
Signals = {
|
||||
//# P0.0 I.00 APS A Ready
|
||||
//# P0.1 I.01 APS A Fault
|
||||
//# P0.2 I.02 BPS A Ready
|
||||
//# P0.3 I.03 BPS A Fault
|
||||
//# P0.4 I.04 MHVPS Over volage
|
||||
//# P0.5 I.05 MHVPS Over current
|
||||
//# P0.6 I.06 MHVPS Trip
|
||||
//# P0.7 I.07 MHVPS Ready
|
||||
DI0 = {
|
||||
Type = uint8
|
||||
PortId = 0
|
||||
InversionMask = 0x40
|
||||
}
|
||||
//# P1.0 I.08 ECPC Modulation
|
||||
//# P1.1 I.09 Fast Protection Trip
|
||||
//# P1.2 I.10
|
||||
//# P1.3 I.11 CRIO RV1
|
||||
//# P1.4 I.12 CRIO RV2
|
||||
//# P1.5 I.13 CRIO RV3
|
||||
//# P1.6 I.14 LV1 Alarm
|
||||
//# P1.7 I.15 PLC STANDBY
|
||||
DI1 = {
|
||||
Type = uint8
|
||||
PortId = 1
|
||||
}
|
||||
//# P2.0 I.16 PLC READY
|
||||
//# P2.1 I.17 PLC ON
|
||||
//# P2.2 I.18 PLC Gyrotron A Operation permitted
|
||||
//# P2.3 I.19 Gyrotron A Operation Selected
|
||||
//# P2.4 I.20 Gyrotron A Collector Coil Operation
|
||||
//# P2.5 I.21 Sync Mode Selected
|
||||
//# P2.6 I.22 Trigger
|
||||
//# P2.7 I.23
|
||||
DI2 = {
|
||||
Type = uint8
|
||||
PortId = 2
|
||||
}
|
||||
//# P3.0 O.00 APS_HVON
|
||||
//# P3.1 O.01 APS_SWON
|
||||
//# P3.2 O.02 APS_Shutdown
|
||||
//# P3.3 O.03 BPS_HVON
|
||||
//# P3.4 O.04 BPS_SWON
|
||||
//# P3.5 O.05 BPS_Shutdown
|
||||
//# P3.6 O.06 GY1_Beam_ON_status
|
||||
//# P3.7 O.07 RV5 _cRIO
|
||||
DO3 = {
|
||||
Type = uint8
|
||||
PortId = 3
|
||||
InversionMask = 0xFF
|
||||
}
|
||||
//# P4.0 O.08 RV6 _cRIO
|
||||
//# P4.1 O.09 RV7 _cRIO
|
||||
//# P4.2 O.10 RV8 _cRIO
|
||||
//# P4.3 O.11 MHVPS_HVON
|
||||
//# P4.4 O.12 MHVPS_Shutdown
|
||||
//# P4.5 O.13 MHVPS_MOD
|
||||
//# P4.6 O.14 PCF_FLT
|
||||
//# P4.7 O.15 HVArmed
|
||||
DO4 = {
|
||||
Type = uint8
|
||||
PortId = 4
|
||||
InversionMask = 0xFF
|
||||
}
|
||||
//# P5.0 O.16 HVInjection
|
||||
//# P5.1 O.17 RFON
|
||||
//# P5.2 O.18 FHPS_Rampup_complete
|
||||
//# P5.3 O.19 SCM_RU_Complete
|
||||
//# P5.4 O.20 SCM_RD_Complete
|
||||
//# P5.5 O.21 CCPS_IN_OPERATION
|
||||
//# P5.6 O.22 PXI_FLT
|
||||
//# P5.7 O.23
|
||||
DO5 = {
|
||||
Type = uint8
|
||||
PortId = 5
|
||||
InversionMask = 0xFF
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//# PXI NI6528 Digital input datasource
|
||||
//# TODO: configure it
|
||||
+NI6528_1_DIO = {
|
||||
Class = NI6528
|
||||
DeviceName = "/dev/pxi6528"
|
||||
BoardId = 0 // TODO: check if not 1
|
||||
Signals = {
|
||||
//# P5.6 O.22 PXI_FLT
|
||||
DO5 = {
|
||||
Type = uint8
|
||||
PortId = 5
|
||||
InversionMask = 0xFF
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//# Direct HW accesses. Follwing device/port assignment must be consistent with actual wiring.
|
||||
//# NI6259.0
|
||||
//# APS_SWON BoardId=0, PortId=3.0
|
||||
+NI6259_DIO_P0 = {
|
||||
Class = "NI6259::NI6259DIO"
|
||||
DeviceName = "/dev/pxi6259"
|
||||
BoardId = 1
|
||||
Signals = {
|
||||
Status = {
|
||||
Type = uint32
|
||||
}
|
||||
NI6259Value = {
|
||||
Type = uint32
|
||||
Mask = 0xFF
|
||||
PortId = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+INITIAL = {
|
||||
Class = ReferenceContainer
|
||||
+Start = {
|
||||
Class = StateMachineEvent
|
||||
NextState = "WAITSTANDBY"
|
||||
NextStateError = "ERROR"
|
||||
+StartHttpServer = {
|
||||
Class = Message
|
||||
Destination = WebServer
|
||||
Function = "Start"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitStandby
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_standby
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
+OpenDANWriterDIO = {
|
||||
Class = Message
|
||||
Destination = RTApp.Data.DANDIODataSource
|
||||
Function = "OpenStream"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+OpenDANWriterAI = {
|
||||
Class = Message
|
||||
Destination = RTApp.Data.FastAnalogDAN
|
||||
Function = "OpenStream"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+WAITSTANDBY = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitReady = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITREADY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitReady
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_ready
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoDisabled = {
|
||||
Class = StateMachineEvent
|
||||
NextState = DISABLED
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Disabled
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_disabled
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoError = {
|
||||
Class = StateMachineEvent
|
||||
NextState = ERROR
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Error
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_error
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+WAITREADY = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitStandby = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITSTANDBY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitStandby
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_standby
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitPermit = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITPERMIT
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitPermit
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_permit
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoError = {
|
||||
Class = StateMachineEvent
|
||||
NextState = ERROR
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Error
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_error
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+WAITPERMIT = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitReady = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITREADY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitReady
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_ready
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitHVON = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITHVON
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitHVON
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_hvon
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitHVON_SDN = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITHVON_SDN
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitHVON_SDN
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_hvon_sdn
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitHVON_PREP = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITHVON_PREP
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitHVON_PREP
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_hvon_prep
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitHVON_SDN_PREP = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITHVON_SDN_PREP
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitHVON_SDN_PREP
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_hvon_sdn_prep
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoError = {
|
||||
Class = StateMachineEvent
|
||||
NextState = ERROR
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Error
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_error
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+WAITHVON = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitStandby = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITSTANDBY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitStandby
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_standby
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitPermit = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITPERMIT
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitPermit
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_permit
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoError = {
|
||||
Class = StateMachineEvent
|
||||
NextState = ERROR
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Error
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_error
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+WAITHVON_PREP = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitStandby = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITSTANDBY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitStandby
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_standby
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitPermit = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITPERMIT
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitPermit
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_permit
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoError = {
|
||||
Class = StateMachineEvent
|
||||
NextState = ERROR
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Error
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_error
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+WAITHVON_SDN = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitStandby = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITSTANDBY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitStandby
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_standby
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitPermit = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITPERMIT
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitPermit
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_permit
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoError = {
|
||||
Class = StateMachineEvent
|
||||
NextState = ERROR
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Error
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_error
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+WAITHVON_SDN_PREP = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitStandby = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITSTANDBY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitStandby
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_standby
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoWaitPermit = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITPERMIT
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitPermit
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_permit
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoError = {
|
||||
Class = StateMachineEvent
|
||||
NextState = ERROR
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Error
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_error
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
//# Error State (Enter by HVPS errors)
|
||||
+ERROR = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitStandby = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITSTANDBY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitStandby
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_standby
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
#package jada_gyro.StateMachine
|
||||
|
||||
+DISABLED = {
|
||||
Class = ReferenceContainer
|
||||
+GoWaitStandby = {
|
||||
Class = StateMachineEvent
|
||||
NextState = WAITSTANDBY
|
||||
NextStateError = ERROR
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = WaitStandby
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_standby
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
+GoError = {
|
||||
Class = StateMachineEvent
|
||||
NextState = "ERROR"
|
||||
NextStateError = "ERROR"
|
||||
+StopCurrentStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StopCurrentStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+PrepareNextStateMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Mode = "ExpectsReply"
|
||||
Function = "PrepareNextState"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
param1 = Error
|
||||
}
|
||||
}
|
||||
+StartNextStateExecutionMsg = {
|
||||
Class = Message
|
||||
Destination = RTApp
|
||||
Function = "StartNextStateExecution"
|
||||
Mode = "ExpectsReply"
|
||||
}
|
||||
+SetState = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_STATE
|
||||
SignalValue = @state_error
|
||||
}
|
||||
}
|
||||
+SetFault = {
|
||||
Class = Message
|
||||
Destination = RTApp.Functions.StateGAM
|
||||
Function = "SetOutput"
|
||||
+Parameters = {
|
||||
Class = ConfigurationDatabase
|
||||
SignalName = PCF_FAULT
|
||||
SignalValue = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
#package jada_gyro.RTApp.Data
|
||||
|
||||
|
||||
+DDB1 = {
|
||||
Signals = {
|
||||
FAST_STOP = {
|
||||
Type = uint32
|
||||
}
|
||||
PREP_TIME_WF = {
|
||||
Type = int32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
MHVPS_PREP_WF = {
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
BPS_PREP_WF = {
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
APS_PREP_WF = {
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
MCPS_PREP_WF = {
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
GCPS_PREP_WF = {
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
FHPS_PREP_WF = {
|
||||
Type = float32
|
||||
NumberOfElements = 8000
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
GYA_PREPRO_TIME = {
|
||||
Type = int32
|
||||
}
|
||||
FHPS_PrePro = {
|
||||
Type = float32
|
||||
}
|
||||
CSV_LOADED = {
|
||||
Type = uint32
|
||||
}
|
||||
CSV_ERR = {
|
||||
Type = uint32
|
||||
}
|
||||
GCPS_TRG_CURR_SET = {
|
||||
Type = float32
|
||||
}
|
||||
MCPS_TRG_CURR_SET = {
|
||||
Type = float32
|
||||
}
|
||||
BPS_OUT = {
|
||||
Type = float32
|
||||
}
|
||||
APS_OUT = {
|
||||
Type = float32
|
||||
}
|
||||
MHVPS_OUT = {
|
||||
Type = float32
|
||||
}
|
||||
MCPS_OUT = {
|
||||
Type = float32
|
||||
}
|
||||
GCPS_OUT = {
|
||||
Type = float32
|
||||
}
|
||||
BPS_REF = {
|
||||
Type = float32
|
||||
}
|
||||
APS_REF = {
|
||||
Type = float32
|
||||
}
|
||||
MHVPS_REF = {
|
||||
Type = float32
|
||||
}
|
||||
//# FHPS Rump Up completed
|
||||
FHPS_RU = {
|
||||
Type = uint8
|
||||
}
|
||||
PXI_FAULT = {
|
||||
Type = uint8
|
||||
}
|
||||
PCF_FAULT = {
|
||||
Type = uint8
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+Th1Bridge = {
|
||||
Class = RealTimeThreadAsyncBridge
|
||||
NumberOfBuffers = 20
|
||||
Signals = {
|
||||
APS_OUT = {
|
||||
Type = float32
|
||||
}
|
||||
BPS_OUT = {
|
||||
Type = float32
|
||||
}
|
||||
MHVPS_OUT = {
|
||||
Type = float32
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
Type = uint8
|
||||
}
|
||||
FHPS_PrePro = {
|
||||
Type = float32
|
||||
}
|
||||
PXI_FAULT = {
|
||||
Type = uint8
|
||||
}
|
||||
PCF_FAULT = {
|
||||
Type = uint8
|
||||
}
|
||||
MCPS_RU_COMPLETED = {
|
||||
Type = uint8
|
||||
}
|
||||
|
||||
MCPS_RD_COMPLETED = {
|
||||
Type = uint8
|
||||
}
|
||||
CCPS_IN_OPERATION = {
|
||||
Type = uint8
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,454 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
|
||||
//# Copy data from DDB1 to EPICSCAOutput DataSource.
|
||||
+EPICSOutputGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
PCF_STATE = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
//! implicit: unkown signal
|
||||
MCPS_ACT_SP = { // TODO what the fuck it is?
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
Value = 0
|
||||
}
|
||||
//! implicit: unkown signal
|
||||
GCPS_ACT_SP = { // TODO what the fuck it is?
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
Value = 0
|
||||
}
|
||||
|
||||
BPS_OUT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
APS_OUT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MCPS_OUT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GCPS_OUT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
FHPS_REF = {
|
||||
DataSource = WGAsyncBridge
|
||||
}
|
||||
CSV_LOADED = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
CSV_ERR = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
ELAPSED_TIME = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_OUT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PREP_TIME_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
BPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
APS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MCPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GCPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
FHPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CCPS_REF = {
|
||||
DataSource = WGAsyncBridge
|
||||
}
|
||||
MHVPS_STOP = {
|
||||
Alias = FAST_STOP
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
APS_STOP = {
|
||||
Alias = FAST_STOP
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
BPS_STOP = {
|
||||
Alias = FAST_STOP
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
// MARTe Internal PCF_FLT
|
||||
PCF_FAULT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PCF_FAULT_Sync = {
|
||||
Alias = PCF_FAULT
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI_FAULT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI_FAULT_Sync = {
|
||||
Alias = PXI_FAULT
|
||||
DataSource = DDB1
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
}
|
||||
SHOT_ID = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
FHPS_AUTO_STAT = {
|
||||
DataSource = WGAsyncBridge
|
||||
}
|
||||
APS_HVON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
APS_SWON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
BPS_HVON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
BPS_SWON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_HVON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
// DO_REV6 = {
|
||||
// DataSource = DDB1
|
||||
// }
|
||||
PXI6259_Status = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI6683_Status = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI6683_PtpdStatus = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
// PXI_6683_SYNCLOST = {
|
||||
// DataSource = DDB1
|
||||
// }
|
||||
PXI6528_Status = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
PCF_STATE = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
MCPS_ACT_SP = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
GCPS_ACT_SP = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
BPS_REF = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = float32
|
||||
}
|
||||
APS_REF = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = float32
|
||||
}
|
||||
MCPS_TRG_CURR_SET = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = float32
|
||||
}
|
||||
GCPS_TRG_CURR_SET = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = float32
|
||||
}
|
||||
FHPS_REF = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = float32
|
||||
}
|
||||
CSV_LOADED = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
CSV_ERR = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
ELAPSED_TIME = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
RFON = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MHVPS_REF = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = float32
|
||||
}
|
||||
PREP_TIME_WF = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MHVPS_PREP_WF = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
BPS_PREP_WF = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
APS_PREP_WF = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MCPS_PREP_WF = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
GCPS_PREP_WF = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
FHPS_PREP_WF = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
CCPS_REF = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MHVPS_STOP = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
APS_STOP = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
BPS_STOP = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = EPICSCAOutput
|
||||
Type = uint32
|
||||
}
|
||||
PCF_FLT = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PCF_FAULT_Sync = {
|
||||
Alias = PCF_FAULT
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
PXI_FLT = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PXI_FAULT_Sync = {
|
||||
Alias = PXI_FAULT
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
SHOT_ID = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
FHPS_AUTO_STAT = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
APS_HVON = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
APS_SWON = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
BPS_HVON = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
BPS_SWON = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MHVPS_HVON = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
EXT_TRIGGER = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
ECPC_MHVPS_MOD = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
CCPS_IN_OP = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
APS_FLT = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
APS_READY = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
BPS_FLT = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
BPS_READY = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MHPS_FLT = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MHPS_READY = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MHPS_OC = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
MHPS_OV = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
FAST_ITL = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
// FAST_PAUSE = {
|
||||
// DataSource = EPICSCAOutput
|
||||
// }
|
||||
PXI_6259_STATE = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PXI_6683_STATE = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
PXI_6683_SYNC = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
// PXI_6683_SYNCLOST = {
|
||||
// DataSource = EPICSCAOutput
|
||||
// }
|
||||
PXI_6528_STATE = {
|
||||
DataSource = EPICSCAOutput
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
// GAM for prepro
|
||||
+WFRecordGAM = {
|
||||
Class = JAWFRecordGAM
|
||||
Directory = "../Configurations" // TODO: Enter directory path for prepro files.
|
||||
InputSignals = {
|
||||
CSV_LOAD = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
Filename = {
|
||||
Alias = CSV_NAME
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
PREP_TIME_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
BPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
APS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MCPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GCPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
FHPS_PREP_WF = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
}
|
||||
}
|
||||
+PreProgrammedGAM = {
|
||||
Class = JAPreProgrammedGAM
|
||||
Directory = "../Configurations" // TODO: Enter the directory path for prepro files.
|
||||
PreProgrammedPeriodMs = 1 // Parameter update periods in ms.
|
||||
InputSignals = {
|
||||
CSV_LOAD = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
Filename = {
|
||||
Alias = CSV_NAME
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
FHPS_REF = {
|
||||
Alias = FHPS_AUTO_TAGV
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
GYA_PREPRO_TIME = {
|
||||
DataSource = DDB1
|
||||
Type = int32
|
||||
}
|
||||
MHVPS_REF = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
BPS_REF = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
APS_REF = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
MCPS_TRG_CURR_SET = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
GCPS_TRG_CURR_SET = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
FHPS_PrePro = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
CSV_LOADED = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
CSV_ERR = {
|
||||
DataSource = DDB1
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
|
||||
+PXIErrorGAM = {
|
||||
Class = JAConditionalSignalUpdateGAM
|
||||
Operation = "OR"
|
||||
InputSignals = {
|
||||
PXI6368_Status_3 = {
|
||||
Alias = PXI6368_Status
|
||||
DataSource = Th4Bridge
|
||||
Comparator = "EQUALS"
|
||||
Type = uint32
|
||||
Value = 3
|
||||
}
|
||||
PXI6368_Status_4 = {
|
||||
Alias = PXI6368_Status
|
||||
DataSource = Th4Bridge
|
||||
Comparator = "EQUALS"
|
||||
Type = uint32
|
||||
Value = 4
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = DDB1
|
||||
Comparator = "GREATER"
|
||||
Type = uint32
|
||||
Value = 0
|
||||
}
|
||||
PXI6259_Status = {
|
||||
DataSource = DDB1
|
||||
Comparator = "GREATER"
|
||||
Type = uint32
|
||||
Value = 0
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
PXI_FAULT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
DefaultValue = 0
|
||||
Value = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
//# MCPS, GCPS PV to DDB1
|
||||
+MCPSGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
MCPS_TRG_CURR_MANUAL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
GCPS_TRG_CURR_MANUAL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
MCPS_TRG_CURR_SET = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
GCPS_TRG_CURR_SET = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
//# Switching AO port source between internal variable and EPICS PV.
|
||||
+ChoiceGAM = {
|
||||
Class = JASourceChoiceGAM
|
||||
numberOfPVs = 5
|
||||
InputSignals = {
|
||||
BPS_REF = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
BPS_MANUAL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
BPS_MM = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
APS_REF = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
APS_MANUAL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
APS_MM = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
MHVPS_REF = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
MHVPS_MANUAL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
MHVPS_MM = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
MCPS_TRG_CURR_SET = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
MCPS_TRG_CURR_MANUAL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
MCPS_MM = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
GCPS_TRG_CURR_SET = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
GCPS_TRG_CURR_MANUAL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
GCPS_MM = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
BPS_OUT = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
APS_OUT = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
MHVPS_OUT = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
MCPS_OUT = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
GCPS_OUT = {
|
||||
DataSource = DDB1
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,530 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
|
||||
+Data = {
|
||||
+DDB1 = {
|
||||
Signals = {
|
||||
//# Fast controller state variable
|
||||
//# - 0: Init
|
||||
//# - 1: Error
|
||||
//# - 3: Wait Standby
|
||||
//# - 4: Wait Ready
|
||||
//# - 5: Wait Permit
|
||||
//# - 6: Wait HVON
|
||||
//# - 7: Wait HVON PREP
|
||||
//# - 8: Wait HVON SDN
|
||||
//# - 9: Wait HVON SDN PREP
|
||||
PCF_STATE = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Functions = {
|
||||
//# GAM That publish state of the system
|
||||
//# The values will be updated by messages coming from
|
||||
//# the statemachine
|
||||
+StateGAM = {
|
||||
Class = ConstantGAM
|
||||
OutputSignals = {
|
||||
PCF_STATE = {
|
||||
DataSource = DDB1
|
||||
Default = @state_none
|
||||
}
|
||||
PCF_FAULT = {
|
||||
DataSource = DDB1
|
||||
Default = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
//# From any state to Error state.
|
||||
+GoErrorGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "OR"
|
||||
InputSignals = {
|
||||
PXI_FAULT = {
|
||||
DataSoruce = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
// PLC_ITL = {
|
||||
// DataSource = DDB1
|
||||
// Type = uint8
|
||||
// Comparator = "EQUALS"
|
||||
// Value = 1
|
||||
// }
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoError
|
||||
}
|
||||
}
|
||||
|
||||
//# From any state to Error state.
|
||||
+GoErrorHVGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "OR"
|
||||
InputSignals = {
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PXI_FAULT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MIS_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoError
|
||||
}
|
||||
}
|
||||
//# Reset Error GAM
|
||||
+ResetErrorGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
RESET_FLT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PXI_FAULT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
// PLC_ITL = {
|
||||
// DataSource = DDB1
|
||||
// Type = uint8
|
||||
// Comparator = "EQUALS"
|
||||
// Value = 0
|
||||
// }
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitStandby
|
||||
}
|
||||
}
|
||||
//# Go to wait standby
|
||||
+GoWaitStandbyGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_SELECT = {
|
||||
DataSource = EPICSCAInput
|
||||
Comparator = "EQUALS"
|
||||
Type = uint32
|
||||
Value = 1
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitStandby
|
||||
}
|
||||
}
|
||||
+GoDisabledGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_SELECT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoDisabled
|
||||
}
|
||||
}
|
||||
//# GAM in WaitReady state. Check MCPS,GCPS,FHPS state for state transition.
|
||||
+GoWaitReadyGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
MCPS_ACT_RB = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 3
|
||||
}
|
||||
MCPS_CURR_MON = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
Comparator = "GREATER"
|
||||
Value = 0.0
|
||||
}
|
||||
GCPS_ACT_RB = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 3
|
||||
}
|
||||
GCPS_CURR_MON = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
Comparator = "GREATER"
|
||||
Value = 0.0
|
||||
}
|
||||
FHPS_RU = {
|
||||
DataSource = DDB1
|
||||
Comparator = "EQUALS"
|
||||
Type = uint8
|
||||
Value = 1
|
||||
}
|
||||
GY_FHPS_MEAS_ACV = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
Comparator = "GREATER"
|
||||
Value = 0.0
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitReady
|
||||
}
|
||||
}
|
||||
//# GAM in WaitReady state. Check PLC_READY and CCPS_IN_OPERATION status.
|
||||
+GoWaitPermitGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MIS_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitPermit
|
||||
}
|
||||
}
|
||||
+GoWaitStandbyFromReadyGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Value = 0
|
||||
Comparator = "EQUALS"
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitStandby
|
||||
}
|
||||
}
|
||||
//# GAM in WaitPermit state. Check Permit and States of Operation Modes.
|
||||
+GoWaitReadyFromWaitPermitGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "OR"
|
||||
InputSignals = {
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Value = 0
|
||||
Comparator = "EQUALS"
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Value = 0
|
||||
Comparator = "EQUALS"
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitReady
|
||||
}
|
||||
}
|
||||
+GoWaitHVONGAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
PREP_MODE = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MIS_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
|
||||
PLC_ITL = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitHVON
|
||||
}
|
||||
}
|
||||
+GoWaitHVON_PREP_GAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
PREP_MODE = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitHVON_PREP
|
||||
}
|
||||
}
|
||||
+GoWaitHVON_SDN_GAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PREP_MODE = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MIS_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
|
||||
PLC_ITL = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitHVON_SDN
|
||||
}
|
||||
}
|
||||
+GoWaitHVON_SDN_PREP_GAM = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PREP_MODE = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MIS_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
|
||||
PLC_ITL = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitHVON_SDN_PREP
|
||||
}
|
||||
}
|
||||
//# GAM in WaitHVON_xx states. If PLC_READY is zero, goto WaitStandby.
|
||||
+FromWaitHVONToWaitStandby = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_READY = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitStandby
|
||||
}
|
||||
}
|
||||
//# GAM in WaitHVON_xx states. If PLC_PERMIT is zero, goto WaitPermit.
|
||||
+FromWaitHVONToWaitPermit = {
|
||||
Class = JAMessageGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
APS_HVON = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
BPS_HVON = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
MHVPS_HVON = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
BPS_SWON = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
APS_SWON = {
|
||||
DataSource = DDB1
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 0
|
||||
}
|
||||
}
|
||||
+Event = {
|
||||
Class = Message
|
||||
Destination = StateMachine
|
||||
Function = GoWaitPermit
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,539 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
|
||||
//# Synchronise Thread 1 to Thread 3 using SynchTread data source
|
||||
//# Thread 1 will be executed every @fast_slow_ratio cycles of Thread 3
|
||||
+SyncThreadConsumerGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
PXI6259_Status = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
Frequency = 1
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PXI6683_Status = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PXI6683_PtpdStatus = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
RFON = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
RFON_TIME = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
SHOT_ID = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = SynchThread
|
||||
Samples = @fast_slow_ratio
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
PXI6259_Status_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI6528_Status_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI6683_Status_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI6683_PtpdStatus_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_APS_READY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_APS_FLT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_BPS_READY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_BPS_FLT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_OV_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_OC_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_FLT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_READY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
ECPC_MOD_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
FAST_TRIP_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_ITL_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_STANDBY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_READY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_ON_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_PERMIT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_OP_SELECTED_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_CC_OP_SELECTED_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_SYNCMODE_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
TRIGGER_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
BEAM_ON_STAT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
HVARMED_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
HVINJECTION_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
RFON_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
ELAPSED_TIME_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
BEAM_ON_TIME_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
SHOT_ID_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV1_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV2_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV3_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+DecimateGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
PXI6259_Status_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PXI6528_Status_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PXI6683_Status_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PXI6683_PtpdStatus_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
GYA_APS_READY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
GYA_APS_FLT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
GYA_BPS_READY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
GYA_BPS_FLT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
MHVPS_OV_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
MHVPS_OC_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
MHVPS_FLT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
MHVPS_READY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
ECPC_MOD_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
FAST_TRIP_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PLC_ITL_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PLC_STANDBY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PLC_READY_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PLC_ON_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PLC_PERMIT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PLC_OP_SELECTED_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PLC_CC_OP_SELECTED_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
PLC_SYNCMODE_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
TRIGGER_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
BEAM_ON_STAT_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
HVARMED_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
HVINJECTION_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
RFON_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
ELAPSED_TIME_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
BEAM_ON_TIME_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
SHOT_ID_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
CRIO_RV1_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
CRIO_RV2_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
CRIO_RV3_SAMPLES = {
|
||||
DataSource = DDB1
|
||||
Ranges = { { @dec_index, @dec_index } }
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
PXI6259_Status = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI6683_Status = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PXI6683_PtpdStatus = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
ELAPSED_TIME = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
SHOT_ID = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+EPICSThSyncGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
BPS_OUT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
APS_OUT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MHVPS_OUT = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
FHPS_PrePro = {
|
||||
DataSource = DDB1
|
||||
}
|
||||
MCPS_RU_COMPLETED = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
MCPS_RD_COMPLETED = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
CCPS_IN_OPERATION = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
BPS_OUT = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
APS_OUT = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
MHVPS_OUT = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
FHPS_PrePro = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
MCPS_RU_COMPLETED = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
MCPS_RD_COMPLETED = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
CCPS_IN_OPERATION = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
|
||||
+Data = {
|
||||
//# SDN subscriber
|
||||
+SDNCommands = {
|
||||
Class = "SDN::SDNSubscriber"
|
||||
Topic = "ECPC2SCUJA"
|
||||
Interface = "enp35s0f1"
|
||||
CPUs = 0x200
|
||||
Locked = 1
|
||||
Timeout = 2
|
||||
Signals = {
|
||||
//! unused: SDN header has no use in this appliation
|
||||
Header = {
|
||||
Type = uint8
|
||||
NumberOfElements = 48
|
||||
}
|
||||
//! unused: not used for nothing
|
||||
Dummy = {
|
||||
Type = uint8
|
||||
NumberOfElements = 4
|
||||
}
|
||||
ESDNTime = {
|
||||
Type = uint32
|
||||
NumberOfElements = 1
|
||||
}
|
||||
Command = {
|
||||
Type = uint16
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 64
|
||||
}
|
||||
}
|
||||
}
|
||||
+Th2Bridge = {
|
||||
Class = RealTimeThreadAsyncBridge
|
||||
NumberOfBuffers = 20
|
||||
Signals = {
|
||||
Command = {
|
||||
Type = uint16
|
||||
}
|
||||
RFON = {
|
||||
Type = uint32
|
||||
}
|
||||
Time = {
|
||||
Type = uint32
|
||||
}
|
||||
HVInjection = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
+DDB2 = {
|
||||
Signals = {
|
||||
WaveformPacketID = {
|
||||
Type = uint16
|
||||
}
|
||||
ESDNTime = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
+SDNReply = {
|
||||
Class = "SDN::SDNPublisher"
|
||||
Topic = "SCUJA2ECPC"
|
||||
Interface = "enp35s0f1"
|
||||
CPUs = 0x200 // changed from 0x100
|
||||
Address = "192.195.1.1"
|
||||
Port = 2000
|
||||
Locked = 1
|
||||
Signals = {
|
||||
//! unused: SDN header not used
|
||||
Header = {
|
||||
Type = uint8
|
||||
NumberOfElements = 48
|
||||
}
|
||||
//! unused: not used anywhere
|
||||
Dummy = {
|
||||
Type = uint8
|
||||
NumberOfElements = 4
|
||||
}
|
||||
ESDNTime = {
|
||||
Type = uint32
|
||||
}
|
||||
//! unused: why?
|
||||
ReplyStatus = {
|
||||
Type = uint16
|
||||
}
|
||||
ReplyWaveformAck = {
|
||||
Type = uint16
|
||||
}
|
||||
// Status (26Bytes?) is not assigned
|
||||
// GyrotronA measurements
|
||||
// 56Bytes are used as Gyrotron1 Measurements (verified on 2020/10/22)
|
||||
GYA_MHVPS_MESVOLT = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_MHVPS_MESCURR = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_BPS_MESVOLT = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_BPS_MESCURR = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_APS_MESVOLT = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_APS_MESCURR = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_ARC1_MESVOLT = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_ARC2_MESVOLT = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_ARC3_MESVOLT = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_MCPS_CURR_MON = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_GCPS_CURR_MON = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_FHPS_MEAS_ACI = {
|
||||
Type = float32
|
||||
}
|
||||
GYA_CCPS_MEAS_DCI = {
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Functions = {
|
||||
+SDNCommandGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
Command = {
|
||||
DataSource = SDNCommands
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 64
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
ESDNTime = {
|
||||
DataSource = SDNCommands
|
||||
NumberOfDimensions = 1
|
||||
NumberOfElements = 1
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Command = {
|
||||
DataSource = Th2Bridge
|
||||
}
|
||||
ESDNTime = {
|
||||
DataSource = DDB2
|
||||
}
|
||||
}
|
||||
}
|
||||
+SDNReplyGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
ESDNTime = {
|
||||
DataSource = DDB2
|
||||
}
|
||||
WaveformPacketID = {
|
||||
DataSource = DDB2
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_MCPS_CURR_MON = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
GY_GCPS_CURR_MON = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
GY_FHPS_MEAS_ACI = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
GY_CCPS_MEAS_DCI = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
ESDNTime = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
ReplyWaveformAck = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_BPS_MESVOLT = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_BPS_MESCURR = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_APS_MESVOLT = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_APS_MESCURR = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_ARC1_MESVOLT = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_ARC2_MESVOLT = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_ARC3_MESVOLT = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_MHVPS_MESVOLT = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_MHVPS_MESCURR = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_MCPS_CURR_MON = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_GCPS_CURR_MON = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_FHPS_MEAS_ACI = {
|
||||
DataSource = SDNReply
|
||||
}
|
||||
GYA_CCPS_MEAS_DCI = {
|
||||
DataSource = SDNReply
|
||||
Trigger = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
|
||||
+Data = {
|
||||
+SynchThread = {
|
||||
Class = RealTimeThreadSynchronisation
|
||||
Timeout = 100
|
||||
Signals = {
|
||||
DiTime = {
|
||||
Type = uint32
|
||||
}
|
||||
PXI6259_Status = {
|
||||
Type = uint32
|
||||
}
|
||||
PXI6528_Status = {
|
||||
Type = uint32
|
||||
}
|
||||
PXI6683_Status = {
|
||||
Type = uint8
|
||||
}
|
||||
PXI6683_PtpdStatus = {
|
||||
Type = uint8
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_OV = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_OC = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
Type = uint8
|
||||
}
|
||||
MHVPS_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
ECPC_MOD = {
|
||||
Type = uint8
|
||||
}
|
||||
FAST_TRIP = {
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_ITL = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_READY = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_ON = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
Type = uint8
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
Type = uint8
|
||||
}
|
||||
TRIGGER = {
|
||||
Type = uint8
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
Type = uint8
|
||||
}
|
||||
HVARMED = {
|
||||
Type = uint8
|
||||
}
|
||||
HVINJECTION = {
|
||||
Type = uint8
|
||||
}
|
||||
RFON = {
|
||||
Type = uint8
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
Type = uint32
|
||||
}
|
||||
RFON_TIME = {
|
||||
Type = uint32
|
||||
}
|
||||
SHOT_ID = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
+DDB3 = {
|
||||
Signals = {
|
||||
BEAM_ON_TIME = {
|
||||
Type = uint32
|
||||
}
|
||||
RFON_TIME = {
|
||||
Type = uint32
|
||||
}
|
||||
PXI6528_Status = {
|
||||
Type = uint32
|
||||
}
|
||||
MHVPS_DT = {
|
||||
Type = uint32
|
||||
}
|
||||
APS_HVON_DT = {
|
||||
Type = uint32
|
||||
}
|
||||
APS_SWON_DT = {
|
||||
Type = uint32
|
||||
}
|
||||
BPS_HVON_DT = {
|
||||
Type = uint32
|
||||
}
|
||||
BPS_SWON_DT = {
|
||||
Type = uint32
|
||||
}
|
||||
SHOTLEN = {
|
||||
Type = uint32
|
||||
}
|
||||
SHORT_PULSE_MODE = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Functions = {
|
||||
+SyncThreadProducerGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
Time = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PXI6259_Status = {
|
||||
Alias = Status
|
||||
DataSource = NI6259_DIO_P0
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = DDB3
|
||||
Value = 0
|
||||
}
|
||||
PXI6683_Status = {
|
||||
DataSource = TimingBoard
|
||||
Alias = Status
|
||||
}
|
||||
PXI6683_PtpdStatus = {
|
||||
DataSource = TimingBoard
|
||||
Alias = PtpdStatus
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
RFON_TIME = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
SHOT_ID = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
DiTime = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PXI6259_Status = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PXI6683_Status = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PXI6683_PtpdStatus = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
RFON = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
RFON_TIME = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
SHOT_ID = {
|
||||
DataSource = SynchThread
|
||||
}
|
||||
}
|
||||
}
|
||||
+AsyncIOGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
FHPS_RU = {
|
||||
DataSource = WGAsyncBridge
|
||||
}
|
||||
CCPS_IN_OPERATION = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
MCPS_RU_COMPLETED = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
MCPS_RD_COMPLETED = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
FHPS_RU = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
CCPS_IN_OPERATION = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
SCM_RU = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
SCM_RD = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
+Functions = {
|
||||
//# Thread3 pulse parameter EPICS PVs read.
|
||||
//# TODO: Should be better to read it in thread 1 and use a async bridge to copy to 3?
|
||||
+FastEpicsInputGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
MHVPS_DT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
APS_HVON_DT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
APS_SWON_DT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
BPS_HVON_DT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
BPS_SWON_DT = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
SHOTLEN = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
SHORT_PULSE_MODE = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
MHVPS_DT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
APS_HVON_DT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
APS_SWON_DT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BPS_HVON_DT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BPS_SWON_DT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
SHOTLEN = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
SHORT_PULSE_MODE = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
//# Reset HVPS outputs. ToDo: Fix to access NI d.s.
|
||||
+HVPSsOffGAM = {
|
||||
Class = ConstantGAM
|
||||
OutputSignals = {
|
||||
MHVPS_HVON = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
BPS_HVON = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
BPS_SWON = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
APS_HVON = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
APS_SWON = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DDB3
|
||||
Default = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
+FastStopRequestGAM = {
|
||||
Class = JAConditionalSignalUpdateGAM
|
||||
Operation = "OR"
|
||||
InputSignals = {
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
MIS_ITL = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
Comparator = "EQUALS"
|
||||
Value = 1
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
FAST_STOP = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
DefaultValue = 0
|
||||
Value = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
//# Check the selected mode, and check maximum pulse length. Use with a StateMachineGAM
|
||||
+ModeLimitGAM = {
|
||||
Class = JAModeControlGAM
|
||||
InputSignals = {
|
||||
PLC_MODE1 = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
MD1_SHOTLEN_LIM = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
PLC_MODE2 = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
MD2_SHOTLEN_LIM = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
PLC_MODE3 = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
MD3_SHOTLEN_LIM = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
PLC_MODE4 = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
MD4_SHOTLEN_LIM = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
RFON = {
|
||||
DataSource = Th2Bridge
|
||||
}
|
||||
Time = {
|
||||
DataSource = Th2Bridge
|
||||
}
|
||||
HVInjection = {
|
||||
DataSource = Th2Bridge
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
MODE_SHOTLEN_FLAG = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,250 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
+NI6528_0_ReaderGAM = {
|
||||
Class = "IOExt::ExtractBitGAM"
|
||||
InputSignals = {
|
||||
DI0 = {
|
||||
Trigger = 1
|
||||
DataSource = NI6528_0_DIO
|
||||
}
|
||||
DI1 = {
|
||||
DataSource = NI6528_0_DIO
|
||||
}
|
||||
DI2 = {
|
||||
DataSource = NI6528_0_DIO
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
GYA_APS_READY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
//! implicit: placeholder for spare
|
||||
NONE_DI10 = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
NONE_DI23 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
}
|
||||
}
|
||||
// Digital Output port access.
|
||||
// EPICS PV to one uint8 variable
|
||||
+NI6528_0_WriterGAM = {
|
||||
Class = "IOExt::CompactBitGAM"
|
||||
InputSignals = {
|
||||
APS_HVON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
APS_SWON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
APS_STOP = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BPS_HVON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BPS_SWON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BPS_STOP = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
DO_REV5 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
DO_REV6 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
DO_REV7 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
DO_REV8 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_HVON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_STOP = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_MODSW = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PCF_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
FHPS_RU = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
SCM_RU = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
SCM_RD = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
CCPS_IN_OPERATION = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
//! implicit: Placeholder for spare output
|
||||
NONE_DO23 = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
NumberOfElements = 2
|
||||
NumberOfDimensions = 1
|
||||
Default = { 0, 0 }
|
||||
}
|
||||
NONE_DO5_1_Before = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
NumberOfElements = 6
|
||||
NumberOfDimensions = 1
|
||||
Default = { 0, 0, 0, 0, 0, 0 }
|
||||
}
|
||||
PXI_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
//! implicit: Placeholder for spare output
|
||||
NONE_DO5_1_After = {
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
Default = 0
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
DO3 = {
|
||||
DataSource = NI6528_0_DIO
|
||||
}
|
||||
DO4 = {
|
||||
DataSource = NI6528_0_DIO
|
||||
}
|
||||
DO5 = {
|
||||
DataSource = NI6528_0_DIO
|
||||
}
|
||||
DO5_B1 = {
|
||||
Alias = DO5
|
||||
DataSource = NI6528_1_DIO
|
||||
Trigger = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
// //# INPUTs: StateMahine Value, NI6528P3Value and NI6528P4Value
|
||||
// //# OUTPUTs: Each NIxxx data sources.
|
||||
// //# TODO: name is very ambiguos
|
||||
// +TerminalInterfaceGAM = {
|
||||
// Class = JATerminalInterfaceGAM
|
||||
// mhvps_hvon_term = 4
|
||||
// aps_hvon_term = 1
|
||||
// aps_swon_term = 16
|
||||
// bps_hvon_term = 2
|
||||
// bps_swon_term = 8
|
||||
// InputSignals = {
|
||||
// MHVPS_HVON = {
|
||||
// DataSource = DDB3
|
||||
// }
|
||||
// APS_HVON = {
|
||||
// DataSource = DDB3
|
||||
// }
|
||||
// APS_SWON = {
|
||||
// DataSource = DDB3
|
||||
// }
|
||||
// BPS_HVON = {
|
||||
// DataSource = DDB3
|
||||
// }
|
||||
// BPS_SWON = {
|
||||
// DataSource = DDB3
|
||||
// }
|
||||
// SHORT_PULSE_MODE = {
|
||||
// DataSource = EPICSCAInput
|
||||
// Type = uint32
|
||||
// }
|
||||
// // Input signals about HW terminal.
|
||||
// RTSMValue = {
|
||||
// DataSource = DDB3
|
||||
// Type = uint32
|
||||
// }
|
||||
// }
|
||||
// OutputSignals = {
|
||||
// NI6259Value = {
|
||||
// DataSource = NI6259_DIO_P0
|
||||
// Type = uint32
|
||||
// Trigger = 1
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -0,0 +1,197 @@
|
||||
#package jada_gyro.RTApp.Functions
|
||||
|
||||
|
||||
+GAMRealTimeStateMachine = {
|
||||
Class = JARTStateMachineGAM
|
||||
ConditionTrigger = 1
|
||||
mhvps_hvon = 4
|
||||
aps_hvon = 1
|
||||
aps_swon = 16
|
||||
bps_hvon = 2
|
||||
bps_swon = 8
|
||||
InputSignals = {
|
||||
Time = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
APS_HVON_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
APS_SWON_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
BPS_HVON_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
BPS_SWON_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
SHOTLEN = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
FAST_STOP = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MODE_SHOTLEN_FLAG = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
SHORT_PULSE_MODE = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_MODSW = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
// Add 20210121
|
||||
DO_REV6 = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
RTSMValue = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
Trigger = 1
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BeamONTime = {
|
||||
Alias = BEAM_ON_TIME
|
||||
DataSource = DDB3
|
||||
}
|
||||
RFONTime = {
|
||||
Alias = RFON_TIME
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
SHOT_ID = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
APS_HVON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
APS_SWON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BPS_HVON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BPS_SWON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_HVON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
NI6259Value = {
|
||||
DataSource = NI6259_DIO_P0
|
||||
Type = uint32
|
||||
Trigger = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
+GAMSDNRealTimeStateMachine = {
|
||||
Class = JASDNRTStateMachineGAM
|
||||
ConditionTrigger = 1
|
||||
mhvps_hvon = 4
|
||||
aps_hvon = 1
|
||||
aps_swon = 16
|
||||
bps_hvon = 2
|
||||
bps_swon = 8
|
||||
InputSignals = {
|
||||
Time = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MHVPS_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
APS_HVON_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
APS_SWON_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
BPS_HVON_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
BPS_SWON_DT = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
SHOTLEN = {
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
FAST_STOP = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
MODE_SHOTLEN_FLAG = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
Command = {
|
||||
DataSource = Th2Bridge
|
||||
Type = uint16
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
RTSMValue = {
|
||||
DataSource = DDB3
|
||||
Trigger = 1
|
||||
}
|
||||
BeamON = {
|
||||
Alias = BEAM_ON_STAT
|
||||
DataSource = DDB3
|
||||
Type = uint8
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
BeamONTime = {
|
||||
Alias = BEAM_ON_TIME
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
RFONTime = {
|
||||
Alias = RFON_TIME
|
||||
DataSource = DDB3
|
||||
Type = uint32
|
||||
}
|
||||
SHOT_ID = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,652 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
|
||||
+Data = {
|
||||
+FastADC = {
|
||||
Class = "NI6368::NI6368ADC"
|
||||
// The divisor is computed on BaseSampleClockFrequency.
|
||||
SamplingFrequency = @sampling_freq
|
||||
DeviceName = "/dev/pxie-6368"
|
||||
IsMultiplexed = 0 // Default is 0 for 6368. Set to 1 if using 6363.
|
||||
BoardId = 0 // Mandatory
|
||||
ExecutionMode = "RealTimeThread" // Optional (default is IndepenentThread). Possible values:IndependentThread, RealTimeThread
|
||||
Calibrate = 1 // Optional (default is 0). If disabled the signals show raw acquired value (signal type must be int16). If enabled the samples already converted accordingly to the declared InputRange. In this case the signal type must be float32
|
||||
|
||||
Signals = {
|
||||
Counter = {
|
||||
Type = uint64
|
||||
ResetOnBufferChange = 1
|
||||
}
|
||||
Time = {
|
||||
Type = uint64
|
||||
}
|
||||
Status = {
|
||||
Type = uint32
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 0
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 1
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 2
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 3
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 4
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 5
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 6
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 7
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 8
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
Type = float32
|
||||
ChannelId = 9
|
||||
}
|
||||
}
|
||||
}
|
||||
+TimingBoard = {
|
||||
Class = NI6683H
|
||||
BoardId = 0
|
||||
Signals = {
|
||||
Status = {
|
||||
Type = uint8
|
||||
}
|
||||
PtpdStatus = {
|
||||
Type = uint8
|
||||
}
|
||||
Time = {
|
||||
Type = uint64
|
||||
}
|
||||
}
|
||||
}
|
||||
+DDB4 = {
|
||||
Class = GAMDataSource
|
||||
Signals = {
|
||||
PXI6368_Status = {
|
||||
Type = uint32
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
}
|
||||
}
|
||||
}
|
||||
+FastAnalogDAN = {
|
||||
Class = "DAN::DANSource"
|
||||
NumberOfBuffers = 100
|
||||
CPUMask = @cpus_fdan
|
||||
StackSize = 10000000
|
||||
DanBufferMultiplier = 10000 //10s at 1kHz loop (1M with 1k samples)
|
||||
StoreOnTrigger = 1
|
||||
ICProgName = @app_name
|
||||
NumberOfPreTriggers = 0
|
||||
NumberOfPostTriggers = 0
|
||||
Signals = {
|
||||
Trigger = {
|
||||
Type = uint8
|
||||
}
|
||||
AI_Time = {
|
||||
Type = uint64
|
||||
TimeSignal = 1
|
||||
AbsoluteTime = 1
|
||||
TimeSignalMultiplier = 1e-9
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_APS_V_MEAS")
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_APS_I_MEAS")
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_BPS_V_MEAS")
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_BPS_I_MEAS")
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_MHV_V_MEAS")
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_MHV_I_MEAS")
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_ARC1_V_MEAS")
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_ARC2_V_MEAS")
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_ARC3_V_MEAS")
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
Type = float32
|
||||
NumberOfElements = @slow_clock
|
||||
SamplingFrequency = @sampling_freq
|
||||
NodeName = (@rfid .. ":GY_RF_V_MEAS")
|
||||
}
|
||||
}
|
||||
}
|
||||
+AnalogEpicsOutput = {
|
||||
Class = "EPICSCA::EPICSCAOutput"
|
||||
CPUMask = @cpus_epics // change from 0x200
|
||||
StackSize = 10000000
|
||||
NumberOfBuffers = 50
|
||||
Signals = {
|
||||
PXI6368_Status = {
|
||||
Type = uint32
|
||||
PVName = (@rfid .. "-HWCF:6368-0-STATUS")
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-PA1F:PSU3000-ET")
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-PA1F:PSU3000-IT")
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-ET")
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-PB1F:PSU1000-IT")
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-PMF:PSU0000-ET-GA")
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-PMF:PSU0000-IT-GA")
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-GAF:MOE2810-ET")
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-GAF:MOE2820-ET")
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-GAF:MOE2830-ET")
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
Type = float32
|
||||
PVName = (@rfid .. "-GAF:MRF2910-ET")
|
||||
}
|
||||
}
|
||||
}
|
||||
+Th4Bridge = {
|
||||
Class = RealTimeThreadAsyncBridge
|
||||
NumberOfBuffers = 20
|
||||
Signals = {
|
||||
PXI6368_Status = {
|
||||
Type = uint32
|
||||
}
|
||||
|
||||
GY_APS_V_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+Functions = {
|
||||
+ReadADC = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
Status = {
|
||||
DataSource = FastADC
|
||||
Frequency = 1000
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
DataSource = FastADC
|
||||
Samples = @slow_clock
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
PXI6368_Status = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
}
|
||||
}
|
||||
+PushADCtoDAN = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
TRIGGER_DAN = {
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
Time = {
|
||||
DataSource = TimingBoard
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Trigger = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
AI_Time = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
DataSource = FastAnalogDAN
|
||||
}
|
||||
}
|
||||
}
|
||||
+PushADCtoEpics = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
PXI6368_Status_Async = {
|
||||
Alias = PXI6368_Status
|
||||
DataSource = DDB4
|
||||
}
|
||||
PXI6368_Status = {
|
||||
DataSource = DDB4
|
||||
}
|
||||
GY_APS_V_MEAS_Async = {
|
||||
Alias = GY_APS_V_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_APS_I_MEAS_Async = {
|
||||
Alias = GY_APS_I_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_BPS_V_MEAS_Async = {
|
||||
Alias = GY_BPS_V_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_BPS_I_MEAS_Async = {
|
||||
Alias = GY_BPS_I_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_MHV_V_MEAS_Async = {
|
||||
Alias = GY_MHV_V_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_MHV_I_MEAS_Async = {
|
||||
Alias = GY_MHV_I_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_ARC1_V_MEAS_Async = {
|
||||
Alias = GY_ARC1_V_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_ARC2_V_MEAS_Async = {
|
||||
Alias = GY_ARC2_V_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_ARC3_V_MEAS_Async = {
|
||||
Alias = GY_ARC3_V_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_RF_V_MEAS_Async = {
|
||||
Alias = GY_RF_V_MEAS
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
DataSource = DDB4
|
||||
Ranges = { { 0, 0 } }
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
PXI6368_Status_Async = {
|
||||
Alias = PXI6368_Status
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
PXI6368_Status = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_APS_V_MEAS_Async = {
|
||||
Alias = GY_APS_V_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_APS_V_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_APS_I_MEAS_Async = {
|
||||
Alias = GY_APS_I_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_APS_I_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_BPS_V_MEAS_Async = {
|
||||
Alias = GY_BPS_V_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_BPS_V_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_BPS_I_MEAS_Async = {
|
||||
Alias = GY_BPS_I_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_BPS_I_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_MHV_V_MEAS_Async = {
|
||||
Alias = GY_MHV_V_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_MHV_V_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_MHV_I_MEAS_Async = {
|
||||
Alias = GY_MHV_I_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_MHV_I_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_ARC1_V_MEAS_Async = {
|
||||
Alias = GY_ARC1_V_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_ARC1_V_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_ARC2_V_MEAS_Async = {
|
||||
Alias = GY_ARC2_V_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_ARC2_V_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_ARC3_V_MEAS_Async = {
|
||||
Alias = GY_ARC3_V_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_ARC3_V_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
GY_RF_V_MEAS_Async = {
|
||||
Alias = GY_RF_V_MEAS
|
||||
DataSource = Th4Bridge
|
||||
}
|
||||
GY_RF_V_MEAS = {
|
||||
DataSource = AnalogEpicsOutput
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,763 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
|
||||
+Data = {
|
||||
+DDB5 = {
|
||||
Class = GAMDataSource
|
||||
AllowNoProducers = 1
|
||||
Signals = {
|
||||
DiTime = {
|
||||
Type = uint32
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PXI6528_Status = {
|
||||
Type = uint32
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
MHVPS_OV = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
MHVPS_OC = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
MHVPS_READY = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
ECPC_MOD = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
FAST_TRIP = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PLC_ITL = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PLC_READY = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PLC_ON = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
TRIGGER = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
HVARMED = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
HVINJECTION = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
RFON = {
|
||||
Type = uint8
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
Type = uint32
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
RFON_TIME = {
|
||||
Type = uint32
|
||||
NumberOfElements = @dan_ratio
|
||||
NumberOfDimensions = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
+DANDIODataSource = {
|
||||
Class = "DAN::DANSource"
|
||||
NumberOfBuffers = 100
|
||||
CPUMask = @cpus_dio
|
||||
StackSize = 10000000
|
||||
DanBufferMultiplier = 200 //10s at 20Hz
|
||||
StoreOnTrigger = 0
|
||||
ICProgName = @app_name
|
||||
NumberOfPreTriggers = 0
|
||||
NumberOfPostTriggers = 0
|
||||
Signals = {
|
||||
DI_Time = {
|
||||
Type = uint32
|
||||
TimeSignal = 1
|
||||
AbsoluteTime = 0
|
||||
}
|
||||
PXI6528_Status = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint32
|
||||
NodeName = @rfid .. ":PXI6528_Status"
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":GYA_APS_READY"
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":GYA_APS_FLT"
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":GYA_BPS_READY"
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":GYA_BPS_FLT"
|
||||
}
|
||||
MHVPS_OV = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":MHVPS_OV"
|
||||
}
|
||||
MHVPS_OC = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":MHVPS_OC"
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":MHVPS_FLT"
|
||||
}
|
||||
MHVPS_READY = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":MHVPS_READY"
|
||||
}
|
||||
ECPC_MOD = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":ECPC_MOD"
|
||||
}
|
||||
FAST_TRIP = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":FAST_TRIP"
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":CRIO_RV1"
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":CRIO_RV2"
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":CRIO_RV3"
|
||||
}
|
||||
PLC_ITL = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":PLC_ITL"
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":PLC_STANDBY"
|
||||
}
|
||||
PLC_READY = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":PLC_READY"
|
||||
}
|
||||
PLC_ON = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":PLC_ON"
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":PLC_PERMIT"
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":PLC_OP_SELECTED"
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":PLC_CC_OP_SELECTED"
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":PLC_SYNCMODE"
|
||||
}
|
||||
TRIGGER = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":TRIGGER"
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":BEAM_ON_STAT"
|
||||
}
|
||||
HVARMED = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":HVARMED"
|
||||
}
|
||||
HVINJECTION = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint8
|
||||
NodeName = @rfid .. ":HVINJECTION"
|
||||
}
|
||||
RFON = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
NodeName = @rfid .. ":RFON"
|
||||
Type = uint8
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
NodeName = @rfid .. ":BEAM_ON_TIME"
|
||||
Type = uint32
|
||||
}
|
||||
RFON_TIME = {
|
||||
SamplingFrequency = @fast_clock
|
||||
NumberOfElements = @dan_ratio
|
||||
Type = uint32
|
||||
NodeName = @rfid .. ":RFON_TIME"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+Functions = {
|
||||
+WaitForDioSignals = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
DiTime = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
Frequency = 1
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
RFON = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
RFON_TIME = {
|
||||
DataSource = SynchThread
|
||||
Samples = @dan_ratio
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
DiTime = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
RFON_TIME = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+DANDIOPublisherGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
DiTime = {
|
||||
DataSource = DDB5
|
||||
Ranges = {{0, 0}}
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
RFON_TIME = {
|
||||
DataSource = DDB5
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
DI_Time = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PXI6528_Status = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
GYA_APS_READY = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
GYA_APS_FLT = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
GYA_BPS_READY = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
GYA_BPS_FLT = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
MHVPS_OV = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
MHVPS_OC = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
MHVPS_FLT = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
MHVPS_READY = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
ECPC_MOD = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
FAST_TRIP = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
CRIO_RV1 = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
CRIO_RV2 = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
CRIO_RV3 = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PLC_ITL = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PLC_READY = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PLC_ON = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PLC_PERMIT = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PLC_OP_SELECTED = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PLC_CC_OP_SELECTED = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
PLC_SYNCMODE = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
TRIGGER = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
BEAM_ON_STAT = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
HVARMED = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
HVINJECTION = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
RFON = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
BEAM_ON_TIME = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
RFON_TIME = {
|
||||
DataSource = DANDIODataSource
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
|
||||
+Functions = {
|
||||
//# GAM for trianguler waveform generation.
|
||||
+CCPSWaveformGAM = {
|
||||
Class = JATriangleWaveGAM
|
||||
InputSignals = {
|
||||
Frequency = {
|
||||
Alias = CCPS_OUTPUT_FREQ
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
Amplitude = {
|
||||
Alias = CCPS_OUTPUT_AMP
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
Offset = {
|
||||
Alias = CCPS_OUTPUT_OFFS
|
||||
DataSource = EPICSCAInput
|
||||
}
|
||||
PLCSTANDBY = {
|
||||
Alias = PLC_STANDBY
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
CCPS_REF = {
|
||||
DataSource = DDB6
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+Data = {
|
||||
+DDB6 = {
|
||||
AllowNoProducers = 1
|
||||
Signals = {
|
||||
CCPS_REF = {
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
|
||||
+Functions = {
|
||||
|
||||
//# Flat FHPS Setpoint.
|
||||
+FHPSSetpointGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
FHPS_AUTO_TAGV = {
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
FHPS_TAGV = {
|
||||
DataSource = DDB6
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//# Filament heating rampup reference generator
|
||||
+FHPSRampupGAM = {
|
||||
Class = JARampupGAM
|
||||
InputSignals = {
|
||||
Targetv = {
|
||||
Alias = FHPS_TAGV
|
||||
DataSource = DDB6
|
||||
}
|
||||
Time = {
|
||||
Alias = FHPS_AUTO_TIME
|
||||
DataSource = EPICSCAInput
|
||||
Type = float32
|
||||
}
|
||||
Start = {
|
||||
Alias = FHPS_AUTO_START
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
PLC_STANDBY = {
|
||||
Alias = PLC_STANDBY
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
MANUAL_AUTO = {
|
||||
Alias = FHPS_MANM
|
||||
DataSource = EPICSCAInput
|
||||
Type = uint32
|
||||
}
|
||||
FHPS_PrePro = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
FHPS_REF = {
|
||||
DataSource = DDB6 // probably to be direct analog output
|
||||
}
|
||||
FHPS_AUTO_STAT = {
|
||||
DataSource = DDB6
|
||||
}
|
||||
}
|
||||
}
|
||||
+FHPSStateGAM = {
|
||||
Class = JAConditionalSignalUpdateGAM
|
||||
Operation = "AND"
|
||||
InputSignals = {
|
||||
FHPS_AUTO_STAT = {
|
||||
DataSource = DDB6
|
||||
Type = uint32
|
||||
Comparator = "EQUALS"
|
||||
Value = 2
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
FHPS_RU = {
|
||||
DataSource = WGAsyncBridge
|
||||
Type = uint8
|
||||
DefaultValue = 0
|
||||
Value = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
+FHPSGainGAM = {
|
||||
Class = ScaleGAM
|
||||
InputSignals = {
|
||||
FHPS_REF = {
|
||||
DataSource = DDB6
|
||||
Factor = 15
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
FHPS_SCALED = {
|
||||
DataSource = DDB6
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Data = {
|
||||
+DDB6 = {
|
||||
Signals = {
|
||||
FHPS_REF = {
|
||||
Type = float32
|
||||
}
|
||||
FHPS_SCALED = {
|
||||
Type = float32
|
||||
}
|
||||
FHPS_TAGV = {
|
||||
Type = float32
|
||||
}
|
||||
FHPS_AUTO_STAT = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
|
||||
+Data = {
|
||||
+WGAsyncBridge = {
|
||||
Class = RealTimeThreadAsyncBridge
|
||||
NumberOfBuffers = 20
|
||||
Signals = {
|
||||
CCPS_REF = {
|
||||
Type = float32
|
||||
}
|
||||
FHPS_REF = {
|
||||
Type = float32
|
||||
}
|
||||
FHPS_AUTO_STAT = {
|
||||
Type = uint32
|
||||
}
|
||||
FHPS_RU = {
|
||||
Type = uint8
|
||||
}
|
||||
}
|
||||
}
|
||||
+NI6259_AO = {
|
||||
Class = NI6259DAC
|
||||
DeviceName = "/dev/pxi6259" // Mandatory
|
||||
BoardId = 1 // Mandatory
|
||||
SamplingFrequency = @wg_clock
|
||||
Signals = {
|
||||
CCPS_REF = {
|
||||
Type = float32 // Mandatory. Only type that is supported.
|
||||
ChannelId = 0 // Mandatory. The channel number.
|
||||
OutputPolarity = "Bipolar" // Optional. Possible values: Bipolar, Unipolar. Default value Unipolar.
|
||||
}
|
||||
FHPS_REF = {
|
||||
Type = float32
|
||||
ChannelId = 1
|
||||
OutputPolarity = "Bipolar"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Functions = {
|
||||
+WGProducerGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
CCPS_REF = {
|
||||
DataSource = DDB6
|
||||
}
|
||||
CCPS_REF_OUT = {
|
||||
Alias = CCPS_REF
|
||||
DataSource = DDB6
|
||||
}
|
||||
FHPS_SCALED = {
|
||||
DataSource = DDB6
|
||||
}
|
||||
FHPS_REF_OUT = {
|
||||
Alias = FHPS_REF
|
||||
DataSource = DDB6
|
||||
}
|
||||
FHPS_AUTO_STAT = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
CCPS_REF = {
|
||||
DataSource = WGAsyncBridge
|
||||
}
|
||||
CCPS_REF_OUT = {
|
||||
Alias = CCPS_REF
|
||||
DataSource = NI6259_AO
|
||||
}
|
||||
FHPS_REF = {
|
||||
DataSource = WGAsyncBridge
|
||||
}
|
||||
FHPS_REF_OUT = {
|
||||
Alias = FHPS_REF
|
||||
DataSource = NI6259_AO
|
||||
Trigger = 1
|
||||
}
|
||||
FHPS_AUTO_STAT = {
|
||||
DataSource = WGAsyncBridge
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
#package jada_gyro.RTApp
|
||||
|
||||
+Data = {
|
||||
//# Timer used for publsihing SDN data
|
||||
+TimerSDN = {
|
||||
Class = LinuxTimer
|
||||
SleepNature = "Busy"
|
||||
SleepPercentage = 40
|
||||
ExecutionMode = "RealTimeThread"
|
||||
Signals = {
|
||||
Counter = {
|
||||
Type = uint32
|
||||
}
|
||||
Time = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
//# Fast Timer for thread 3 (RTStateMachineGAM execution cycle.)
|
||||
+FastTimer = {
|
||||
Class = LinuxTimer
|
||||
SleepNature = "Busy"
|
||||
SleepPercentage = 40
|
||||
ExecutionMode = "RealTimeThread"
|
||||
Signals = {
|
||||
Counter = {
|
||||
Type = uint32
|
||||
}
|
||||
Time = {
|
||||
Type = uint32
|
||||
}
|
||||
AbsoluteTime = {
|
||||
Type = uint64
|
||||
}
|
||||
}
|
||||
}
|
||||
//# Fast Timer for thread 3 (RTStateMachineGAM execution cycle.)
|
||||
+WGTimer = {
|
||||
Class = LinuxTimer
|
||||
SleepNature = "Busy"
|
||||
SleepPercentage = 40
|
||||
ExecutionMode = "RealTimeThread"
|
||||
Signals = {
|
||||
Counter = {
|
||||
Type = uint32
|
||||
}
|
||||
Time = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
// Add signals to existing ddb
|
||||
+DDB2 = {
|
||||
Signals = {
|
||||
Time = {
|
||||
Type = uint32
|
||||
}
|
||||
Counter = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
+DDB3 = {
|
||||
Signals = {
|
||||
Counter = {
|
||||
Type = uint32
|
||||
}
|
||||
Time = {
|
||||
Type = uint32
|
||||
}
|
||||
AbsoluteTime = {
|
||||
Type = uint64
|
||||
}
|
||||
}
|
||||
}
|
||||
+DDB6 = {
|
||||
Signals = {
|
||||
Time = {
|
||||
Type = uint32
|
||||
}
|
||||
Counter = {
|
||||
Type = uint32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+Functions = {
|
||||
//# Timer for SDN thread.
|
||||
+TimeSDNGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
Time = {
|
||||
DataSource = TimerSDN
|
||||
}
|
||||
Counter = {
|
||||
DataSource = TimerSDN
|
||||
Frequency = @slow_clock
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Time = {
|
||||
DataSource = DDB2
|
||||
}
|
||||
Counter = {
|
||||
DataSource = DDB2
|
||||
}
|
||||
}
|
||||
}
|
||||
//# GAM for realtime statemachine
|
||||
+FastTimerGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
Counter = {
|
||||
DataSource = FastTimer
|
||||
Frequency = @fast_clock
|
||||
}
|
||||
Time = {
|
||||
DataSource = FastTimer
|
||||
}
|
||||
AbsoluteTime = {
|
||||
DataSource = FastTimer
|
||||
}
|
||||
PCF_FAULT = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
PXI_FAULT = {
|
||||
DataSource = Th1Bridge
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Counter = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
Time = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
AbsoluteTime = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PCF_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
PXI_FLT = {
|
||||
DataSource = DDB3
|
||||
}
|
||||
}
|
||||
}
|
||||
+WGTimerGAM = {
|
||||
Class = IOGAM
|
||||
InputSignals = {
|
||||
Time = {
|
||||
DataSource = WGTimer
|
||||
}
|
||||
Counter = {
|
||||
DataSource = WGTimer
|
||||
Frequency = @wg_clock
|
||||
}
|
||||
}
|
||||
OutputSignals = {
|
||||
Time = {
|
||||
DataSource = DDB6
|
||||
}
|
||||
Counter = {
|
||||
DataSource = DDB6
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
#package jada_gyro
|
||||
|
||||
|
||||
//# Gyrotron ID
|
||||
#var rfid: string = "EC-GN-P01"
|
||||
//# Fast Clock
|
||||
#var fast_clock: uint32 = 20000 // Hz
|
||||
//# Slow Clock
|
||||
#var slow_clock: uint32 = 1000 // Hz
|
||||
//# WF Generation Clock
|
||||
#var wg_clock: uint32 = 1000 // Hz
|
||||
//# ADC Clock
|
||||
#var sampling_freq: uint32 = 10000 // Hz
|
||||
//# App name
|
||||
#var app_name: string = "JADA_RF01App"
|
||||
|
||||
//# Ratio between fast and slow
|
||||
#let fast_slow_ratio: uint32 = (@fast_clock / @slow_clock)
|
||||
|
||||
#var dan_ratio: uint32 = 1000
|
||||
|
||||
// Constants for state values
|
||||
#let state_error: uint32 = 1
|
||||
#let state_disabled: uint32 = 2
|
||||
#let state_standby: uint32 = 3
|
||||
#let state_ready: uint32 = 4
|
||||
#let state_permit: uint32 = 5
|
||||
#let state_hvon: uint32 = 6
|
||||
#let state_hvon_prep: uint32 = 7
|
||||
#let state_hvon_sdn: uint32 = 8
|
||||
#let state_hvon_sdn_prep: uint32 = 9
|
||||
#let state_none: uint32 = 0
|
||||
|
||||
//# decimation index for sync gam
|
||||
#let dec_index: int = (@fast_slow_ratio - 1)
|
||||
|
||||
// CPUS pinning
|
||||
#var cpus_epics: uint = 0x8
|
||||
#var cpus_sdn: uint = 0x10
|
||||
#var cpus_rt: uint = 0x20
|
||||
#var cpus_adc: uint = 0x40
|
||||
#var cpus_dio: uint = 0x80
|
||||
#var cpus_dan: uint = 0x100
|
||||
#var cpus_wg: uint = 0x200
|
||||
#var cpus_fdan: uint = 0x400
|
||||
@@ -1,41 +0,0 @@
|
||||
-100,0,0,0,0,0,0
|
||||
-90,1,1,1,1,1,1
|
||||
-80,2,2,2,2,2,2
|
||||
-70,3,3,3,3,3,3
|
||||
-60,4,4,4,4,4,4
|
||||
-50,5,5,5,5,5,5
|
||||
-40,6,6,6,6,6,6
|
||||
-30,7,7,7,7,7,7
|
||||
-20,8,8,8,8,8,8
|
||||
-10,9,9,9,9,9,9
|
||||
0,10,10,10,10,10,10
|
||||
10,9,9,9,9,9,9
|
||||
20,8,8,8,8,8,8
|
||||
30,7,7,7,7,7,7
|
||||
40,6,6,6,6,6,6
|
||||
50,5,5,5,5,5,5
|
||||
60,4,4,4,4,4,4
|
||||
70,3,3,3,3,3,3
|
||||
80,2,2,2,2,2,2
|
||||
90,1,1,1,1,1,1
|
||||
100,0,0,0,0,0,0
|
||||
110,1,1,1,1,1,1
|
||||
120,2,2,2,2,2,2
|
||||
130,3,3,3,3,3,3
|
||||
140,4,4,4,4,4,4
|
||||
150,5,5,5,5,5,5
|
||||
160,6,6,6,6,6,6
|
||||
170,7,7,7,7,7,7
|
||||
180,8,8,8,8,8,8
|
||||
190,9,9,9,9,9,9
|
||||
200,10,10,10,10,10,10
|
||||
210,9,9,9,9,9,9
|
||||
220,8,8,8,8,8,8
|
||||
230,7,7,7,7,7,7
|
||||
240,6,6,6,6,6,6
|
||||
250,5,5,5,5,5,5
|
||||
260,4,4,4,4,4,4
|
||||
270,3,3,3,3,3,3
|
||||
280,2,2,2,2,2,2
|
||||
290,1,1,1,1,1,1
|
||||
300,0,0,0,0,0,0
|
||||
|
@@ -1,41 +0,0 @@
|
||||
-100,0,0,0,0,0
|
||||
-90,1,1,1,1,1
|
||||
-80,2,2,2,2,2
|
||||
-70,3,3,3,3,3
|
||||
-60,4,4,4,4,4
|
||||
-50,5,5,5,5,5
|
||||
-40,6,6,6,6,6
|
||||
-30,7,7,7,7,7
|
||||
-20,8,8,8,8,8
|
||||
-10,9,9,9,9,9
|
||||
0,10,10,10,10,10
|
||||
10,9,9,9,9,9
|
||||
20,8,8,8,8,8
|
||||
30,7,7,7,7,7
|
||||
40,6,6,6,6,6
|
||||
50,5,5,5,5,5
|
||||
60,4,4,4,4,4
|
||||
70,3,3,3,3,3
|
||||
80,2,2,2,2,2
|
||||
90,1,1,1,1,1
|
||||
100,0,0,0,0,0
|
||||
110,1,1,1,1,1
|
||||
120,2,2,2,2,2
|
||||
130,3,3,3,3,3
|
||||
140,4,4,4,4,4
|
||||
150,5,5,5,5,5
|
||||
160,6,6,6,6,6
|
||||
170,7,7,7,7,7
|
||||
180,8,8,8,8,8
|
||||
190,9,9,9,9,9
|
||||
200,10,10,10,10,10
|
||||
210,9,9,9,9,9
|
||||
220,8,8,8,8,8
|
||||
230,7,7,7,7,7
|
||||
240,6,6,6,6,6
|
||||
250,5,5,5,5,5
|
||||
260,4,4,4,4,4
|
||||
270,3,3,3,3,3
|
||||
280,2,2,2,2,2
|
||||
290,1,1,1,1,1
|
||||
300,0,0,0,0,0
|
||||
@@ -1,103 +0,0 @@
|
||||
#test configuration file2,,,,,,
|
||||
#Time,MHVPS,BPS,APS,MC,GC,FHPS
|
||||
0,10,10,10,10,10,10
|
||||
10,9,9,9,9,9,9
|
||||
20,8,8,8,8,8,8
|
||||
30,7,7,7,7,7,7
|
||||
40,6,6,6,6,6,6
|
||||
50,5,5,5,5,5,5
|
||||
60,4,4,4,4,4,4
|
||||
70,3,3,3,3,3,3
|
||||
80,2,2,2,2,2,2
|
||||
90,1,1,1,1,1,1
|
||||
100,0,0,0,0,0,0
|
||||
110,1,1,1,1,1,1
|
||||
120,2,2,2,2,2,2
|
||||
130,3,3,3,3,3,3
|
||||
140,4,4,4,4,4,4
|
||||
150,5,5,5,5,5,5
|
||||
160,6,6,6,6,6,6
|
||||
170,7,7,7,7,7,7
|
||||
180,8,8,8,8,8,8
|
||||
190,9,9,9,9,9,9
|
||||
200,10,10,10,10,10,10
|
||||
210,9,9,9,9,9,9
|
||||
220,8,8,8,8,8,8
|
||||
230,7,7,7,7,7,7
|
||||
240,6,6,6,6,6,6
|
||||
250,5,5,5,5,5,5
|
||||
260,4,4,4,4,4,4
|
||||
270,3,3,3,3,3,3
|
||||
280,2,2,2,2,2,2
|
||||
290,1,1,1,1,1,1
|
||||
300,0,0,0,0,0,0
|
||||
310,1,1,1,1,1,1
|
||||
320,2,2,2,2,2,2
|
||||
330,3,3,3,3,3,3
|
||||
340,4,4,4,4,4,4
|
||||
350,5,5,5,5,5,5
|
||||
360,6,6,6,6,6,6
|
||||
370,7,7,7,7,7,7
|
||||
380,8,8,8,8,8,8
|
||||
390,9,9,9,9,9,9
|
||||
400,10,10,10,10,10,10
|
||||
410,9,9,9,9,9,9
|
||||
420,8,8,8,8,8,8
|
||||
430,7,7,7,7,7,7
|
||||
440,6,6,6,6,6,6
|
||||
450,5,5,5,5,5,5
|
||||
460,4,4,4,4,4,4
|
||||
470,3,3,3,3,3,3
|
||||
480,2,2,2,2,2,2
|
||||
490,1,1,1,1,1,1
|
||||
500,0,0,0,0,0,0
|
||||
510,1,1,1,1,1,1
|
||||
520,2,2,2,2,2,2
|
||||
530,3,3,3,3,3,3
|
||||
540,4,4,4,4,4,4
|
||||
550,5,5,5,5,5,5
|
||||
560,6,6,6,6,6,6
|
||||
570,7,7,7,7,7,7
|
||||
580,8,8,8,8,8,8
|
||||
590,9,9,9,9,9,9
|
||||
600,10,10,10,10,10,10
|
||||
610,9,9,9,9,9,9
|
||||
620,8,8,8,8,8,8
|
||||
630,7,7,7,7,7,7
|
||||
640,6,6,6,6,6,6
|
||||
650,5,5,5,5,5,5
|
||||
660,4,4,4,4,4,4
|
||||
670,3,3,3,3,3,3
|
||||
680,2,2,2,2,2,2
|
||||
690,1,1,1,1,1,1
|
||||
700,0,0,0,0,0,0
|
||||
710,1,1,1,1,1,1
|
||||
720,2,2,2,2,2,2
|
||||
730,3,3,3,3,3,3
|
||||
740,4,4,4,4,4,4
|
||||
750,5,5,5,5,5,5
|
||||
760,6,6,6,6,6,6
|
||||
770,7,7,7,7,7,7
|
||||
780,8,8,8,8,8,8
|
||||
790,9,9,9,9,9,9
|
||||
800,10,10,10,10,10,10
|
||||
810,9,9,9,9,9,9
|
||||
820,8,8,8,8,8,8
|
||||
830,7,7,7,7,7,7
|
||||
840,6,6,6,6,6,6
|
||||
850,5,5,5,5,5,5
|
||||
860,4,4,4,4,4,4
|
||||
870,3,3,3,3,3,3
|
||||
880,2,2,2,2,2,2
|
||||
890,1,1,1,1,1,1
|
||||
900,0,0,0,0,0,0
|
||||
910,1,1,1,1,1,1
|
||||
920,2,2,2,2,2,2
|
||||
930,3,3,3,3,3,3
|
||||
940,4,4,4,4,4,4
|
||||
950,5,5,5,5,5,5
|
||||
960,6,6,6,6,6,6
|
||||
970,7,7,7,7,7,7
|
||||
980,8,8,8,8,8,8
|
||||
990,9,9,9,9,9,9
|
||||
1000,10,10,10,10,10,10
|
||||
|
@@ -1,103 +0,0 @@
|
||||
#test configuration file2
|
||||
#Time,BPS,APS,MC,GC,FHPS
|
||||
0,10,10,10,10,10
|
||||
10,9,9,9,9,9
|
||||
20,8,8,8,8,8
|
||||
30,7,7,7,7,7
|
||||
40,6,6,6,6,6
|
||||
50,5,5,5,5,5
|
||||
60,4,4,4,4,4
|
||||
70,3,3,3,3,3
|
||||
80,2,2,2,2,2
|
||||
90,1,1,1,1,1
|
||||
100,0,0,0,0,0
|
||||
110,1,1,1,1,1
|
||||
120,2,2,2,2,2
|
||||
130,3,3,3,3,3
|
||||
140,4,4,4,4,4
|
||||
150,5,5,5,5,5
|
||||
160,6,6,6,6,6
|
||||
170,7,7,7,7,7
|
||||
180,8,8,8,8,8
|
||||
190,9,9,9,9,9
|
||||
200,10,10,10,10,10
|
||||
210,9,9,9,9,9
|
||||
220,8,8,8,8,8
|
||||
230,7,7,7,7,7
|
||||
240,6,6,6,6,6
|
||||
250,5,5,5,5,5
|
||||
260,4,4,4,4,4
|
||||
270,3,3,3,3,3
|
||||
280,2,2,2,2,2
|
||||
290,1,1,1,1,1
|
||||
300,0,0,0,0,0
|
||||
310,1,1,1,1,1
|
||||
320,2,2,2,2,2
|
||||
330,3,3,3,3,3
|
||||
340,4,4,4,4,4
|
||||
350,5,5,5,5,5
|
||||
360,6,6,6,6,6
|
||||
370,7,7,7,7,7
|
||||
380,8,8,8,8,8
|
||||
390,9,9,9,9,9
|
||||
400,10,10,10,10,10
|
||||
410,9,9,9,9,9
|
||||
420,8,8,8,8,8
|
||||
430,7,7,7,7,7
|
||||
440,6,6,6,6,6
|
||||
450,5,5,5,5,5
|
||||
460,4,4,4,4,4
|
||||
470,3,3,3,3,3
|
||||
480,2,2,2,2,2
|
||||
490,1,1,1,1,1
|
||||
500,0,0,0,0,0
|
||||
510,1,1,1,1,1
|
||||
520,2,2,2,2,2
|
||||
530,3,3,3,3,3
|
||||
540,4,4,4,4,4
|
||||
550,5,5,5,5,5
|
||||
560,6,6,6,6,6
|
||||
570,7,7,7,7,7
|
||||
580,8,8,8,8,8
|
||||
590,9,9,9,9,9
|
||||
600,10,10,10,10,10
|
||||
610,9,9,9,9,9
|
||||
620,8,8,8,8,8
|
||||
630,7,7,7,7,7
|
||||
640,6,6,6,6,6
|
||||
650,5,5,5,5,5
|
||||
660,4,4,4,4,4
|
||||
670,3,3,3,3,3
|
||||
680,2,2,2,2,2
|
||||
690,1,1,1,1,1
|
||||
700,0,0,0,0,0
|
||||
710,1,1,1,1,1
|
||||
720,2,2,2,2,2
|
||||
730,3,3,3,3,3
|
||||
740,4,4,4,4,4
|
||||
750,5,5,5,5,5
|
||||
760,6,6,6,6,6
|
||||
770,7,7,7,7,7
|
||||
780,8,8,8,8,8
|
||||
790,9,9,9,9,9
|
||||
800,10,10,10,10,10
|
||||
810,9,9,9,9,9
|
||||
820,8,8,8,8,8
|
||||
830,7,7,7,7,7
|
||||
840,6,6,6,6,6
|
||||
850,5,5,5,5,5
|
||||
860,4,4,4,4,4
|
||||
870,3,3,3,3,3
|
||||
880,2,2,2,2,2
|
||||
890,1,1,1,1,1
|
||||
900,0,0,0,0,0
|
||||
910,1,1,1,1,1
|
||||
920,2,2,2,2,2
|
||||
930,3,3,3,3,3
|
||||
940,4,4,4,4,4
|
||||
950,5,5,5,5,5
|
||||
960,6,6,6,6,6
|
||||
970,7,7,7,7,7
|
||||
980,8,8,8,8,8
|
||||
990,9,9,9,9,9
|
||||
1000,10,10,10,10,10
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,366 +0,0 @@
|
||||
/**
|
||||
* @file JAEPICSCAInput.cpp
|
||||
* @brief Source file for class JAEPICSCAInput
|
||||
* @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 source file contains the definition of all the methods for
|
||||
* the class JAEPICSCAInput (public, protected, and private). Be aware that some
|
||||
* methods, such as those inline could be defined on the header file, instead.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Standard header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "JAEPICSCAInput.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "AdvancedErrorManagement.h"
|
||||
#include "MemoryMapInputBroker.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Static definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace MARTe {
|
||||
/**
|
||||
* @brief Callback function for the ca_create_subscription. Single point of access which
|
||||
* delegates the events to the corresponding JAEPICSPV instance.
|
||||
*/
|
||||
static FastPollingMutexSem eventCallbackFastMux;
|
||||
/*lint -e{1746} function must match required prototype and thus cannot be changed to constant reference.*/
|
||||
void JAEPICSCAInputEventCallback(struct event_handler_args const args) {
|
||||
(void) eventCallbackFastMux.FastLock();
|
||||
PVWrapper *pv = static_cast<PVWrapper *>(args.usr);
|
||||
if (pv != NULL_PTR(PVWrapper *)) {
|
||||
(void) MemoryOperationsHelper::Copy(pv->memory, args.dbr, pv->memorySize);
|
||||
}
|
||||
eventCallbackFastMux.FastUnLock();
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
namespace MARTe {
|
||||
JAEPICSCAInput::JAEPICSCAInput() :
|
||||
DataSourceI(), EmbeddedServiceMethodBinderI(), executor(*this) {
|
||||
pvs = NULL_PTR(PVWrapper *);
|
||||
stackSize = THREADS_DEFAULT_STACKSIZE * 4u;
|
||||
cpuMask = 0xffu;
|
||||
eventCallbackFastMux.Create();
|
||||
}
|
||||
|
||||
/*lint -e{1551} must stop the SingleThreadService in the destructor.*/
|
||||
JAEPICSCAInput::~JAEPICSCAInput() {
|
||||
if (!executor.Stop()) {
|
||||
if (!executor.Stop()) {
|
||||
REPORT_ERROR(ErrorManagement::FatalError, "Could not stop SingleThreadService.");
|
||||
}
|
||||
}
|
||||
(void) eventCallbackFastMux.FastLock();
|
||||
uint32 nOfSignals = GetNumberOfSignals();
|
||||
if (pvs != NULL_PTR(PVWrapper *)) {
|
||||
uint32 n;
|
||||
for (n = 0u; (n < nOfSignals); n++) {
|
||||
if (pvs[n].memory != NULL_PTR(void *)) {
|
||||
GlobalObjectsDatabase::Instance()->GetStandardHeap()->Free(pvs[n].memory);
|
||||
}
|
||||
}
|
||||
delete[] pvs;
|
||||
}
|
||||
eventCallbackFastMux.FastUnLock();
|
||||
}
|
||||
|
||||
bool JAEPICSCAInput::Initialise(StructuredDataI & data) {
|
||||
bool ok = DataSourceI::Initialise(data);
|
||||
if (ok) {
|
||||
if (!data.Read("CPUs", cpuMask)) {
|
||||
REPORT_ERROR(ErrorManagement::Information, "No CPUs defined. Using default = %d", cpuMask);
|
||||
}
|
||||
if (!data.Read("StackSize", stackSize)) {
|
||||
REPORT_ERROR(ErrorManagement::Information, "No StackSize defined. Using default = %d", stackSize);
|
||||
}
|
||||
executor.SetStackSize(stackSize);
|
||||
executor.SetCPUMask(cpuMask);
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.MoveRelative("Signals");
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Could not move to the Signals section");
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.Copy(originalSignalInformation);
|
||||
}
|
||||
if (ok) {
|
||||
ok = originalSignalInformation.MoveToRoot();
|
||||
}
|
||||
//Do not allow to add signals in run-time
|
||||
if (ok) {
|
||||
ok = signalsDatabase.MoveRelative("Signals");
|
||||
}
|
||||
if (ok) {
|
||||
ok = signalsDatabase.Write("Locked", 1u);
|
||||
}
|
||||
if (ok) {
|
||||
ok = signalsDatabase.MoveToAncestor(1u);
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.MoveToAncestor(1u);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAEPICSCAInput::SetConfiguredDatabase(StructuredDataI & data) {
|
||||
bool ok = DataSourceI::SetConfiguredDatabase(data);
|
||||
//Check the signal index of the timing signal.
|
||||
uint32 nOfSignals = GetNumberOfSignals();
|
||||
if (ok) {
|
||||
ok = (nOfSignals > 0u);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "At least one signal shall be defined");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
//Do not allow samples
|
||||
uint32 functionNumberOfSignals = 0u;
|
||||
uint32 n;
|
||||
if (GetFunctionNumberOfSignals(InputSignals, 0u, functionNumberOfSignals)) {
|
||||
for (n = 0u; (n < functionNumberOfSignals) && (ok); n++) {
|
||||
uint32 nSamples;
|
||||
ok = GetFunctionSignalSamples(InputSignals, 0u, n, nSamples);
|
||||
if (ok) {
|
||||
ok = (nSamples == 1u);
|
||||
}
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "The number of samples shall be exactly 1");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
pvs = new PVWrapper[nOfSignals];
|
||||
uint32 n;
|
||||
for (n = 0u; (n < nOfSignals); n++) {
|
||||
pvs[n].memory = NULL_PTR(void *);
|
||||
}
|
||||
for (n = 0u; (n < nOfSignals) && (ok); n++) {
|
||||
//Note that the RealTimeApplicationConfigurationBuilder is allowed to change the order of the signals w.r.t. to the originalSignalInformation
|
||||
StreamString orderedSignalName;
|
||||
ok = GetSignalName(n, orderedSignalName);
|
||||
if (ok) {
|
||||
//Have to mix and match between the original setting of the DataSource signal
|
||||
//and the ones which are later added by the RealTimeApplicationConfigurationBuilder
|
||||
ok = originalSignalInformation.MoveRelative(orderedSignalName.Buffer());
|
||||
}
|
||||
StreamString pvName;
|
||||
if (ok) {
|
||||
ok = originalSignalInformation.Read("PVName", pvName);
|
||||
if (!ok) {
|
||||
uint32 nn = n;
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "No PVName specified for signal at index %d", nn);
|
||||
}
|
||||
}
|
||||
TypeDescriptor td = GetSignalType(n);
|
||||
if (ok) {
|
||||
(void) StringHelper::CopyN(&pvs[n].pvName[0], pvName.Buffer(), PV_NAME_MAX_SIZE);
|
||||
if (td == CharString) {
|
||||
pvs[n].pvType = DBR_STRING;
|
||||
}
|
||||
else if (td == Character8Bit) {
|
||||
pvs[n].pvType = DBR_STRING;
|
||||
}
|
||||
else if (td == SignedInteger8Bit) {
|
||||
pvs[n].pvType = DBR_CHAR;
|
||||
}
|
||||
else if (td == UnsignedInteger8Bit) {
|
||||
pvs[n].pvType = DBR_CHAR;
|
||||
}
|
||||
else if (td == SignedInteger16Bit) {
|
||||
pvs[n].pvType = DBR_SHORT;
|
||||
}
|
||||
else if (td == UnsignedInteger16Bit) {
|
||||
pvs[n].pvType = DBR_SHORT;
|
||||
}
|
||||
else if (td == SignedInteger32Bit) {
|
||||
pvs[n].pvType = DBR_LONG;
|
||||
}
|
||||
else if (td == UnsignedInteger32Bit) {
|
||||
pvs[n].pvType = DBR_LONG;
|
||||
}
|
||||
else if (td == Float32Bit) {
|
||||
pvs[n].pvType = DBR_FLOAT;
|
||||
}
|
||||
else if (td == Float64Bit) {
|
||||
pvs[n].pvType = DBR_DOUBLE;
|
||||
}
|
||||
else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Type %s is not supported", TypeDescriptor::GetTypeNameFromTypeDescriptor(td));
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
uint32 numberOfElements = 1u;
|
||||
if (ok) {
|
||||
ok = GetSignalNumberOfElements(n, numberOfElements);
|
||||
}
|
||||
if (ok) {
|
||||
if (pvs[n].pvType == DBR_STRING) {
|
||||
ok = (numberOfElements == 40u);
|
||||
}
|
||||
if (!ok) {
|
||||
//Could support arrays of strings with multiples of char8[40]
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Strings shall be defined with 40 elements char8[40]. Arrays of strings are not currently supported");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
pvs[n].numberOfElements = numberOfElements;
|
||||
}
|
||||
if (ok) {
|
||||
pvs[n].memorySize = td.numberOfBits;
|
||||
pvs[n].memorySize /= 8u;
|
||||
pvs[n].memorySize *= numberOfElements;
|
||||
pvs[n].memory = GlobalObjectsDatabase::Instance()->GetStandardHeap()->Malloc(pvs[n].memorySize);
|
||||
ok = originalSignalInformation.MoveToAncestor(1u);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
ok = (executor.Start() == ErrorManagement::NoError);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAEPICSCAInput::AllocateMemory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 JAEPICSCAInput::GetNumberOfMemoryBuffers() {
|
||||
return 1u;
|
||||
}
|
||||
|
||||
/*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: The signalAddress is independent of the bufferIdx.*/
|
||||
bool JAEPICSCAInput::GetSignalMemoryBuffer(const uint32 signalIdx, const uint32 bufferIdx, void*& signalAddress) {
|
||||
bool ok = (pvs != NULL_PTR(PVWrapper *));
|
||||
if (ok) {
|
||||
ok = (signalIdx < GetNumberOfSignals());
|
||||
}
|
||||
if (ok) {
|
||||
//lint -e{613} pvs cannot as otherwise ok would be false
|
||||
signalAddress = pvs[signalIdx].memory;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
/*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: The brokerName only depends on the direction */
|
||||
const char8* JAEPICSCAInput::GetBrokerName(StructuredDataI& data, const SignalDirection direction) {
|
||||
const char8* brokerName = "";
|
||||
if (direction == InputSignals) {
|
||||
brokerName = "MemoryMapInputBroker";
|
||||
}
|
||||
return brokerName;
|
||||
}
|
||||
|
||||
bool JAEPICSCAInput::GetInputBrokers(ReferenceContainer& inputBrokers, const char8* const functionName, void* const gamMemPtr) {
|
||||
ReferenceT<MemoryMapInputBroker> broker("MemoryMapInputBroker");
|
||||
bool ok = broker->Init(InputSignals, *this, functionName, gamMemPtr);
|
||||
if (ok) {
|
||||
ok = inputBrokers.Insert(broker);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
/*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: OutputBrokers are not supported. Function returns false irrespectively of the parameters.*/
|
||||
bool JAEPICSCAInput::GetOutputBrokers(ReferenceContainer& outputBrokers, const char8* const functionName, void* const gamMemPtr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: NOOP at StateChange, independently of the function parameters.*/
|
||||
bool JAEPICSCAInput::PrepareNextState(const char8* const currentStateName, const char8* const nextStateName) {
|
||||
return true;
|
||||
}
|
||||
|
||||
ErrorManagement::ErrorType JAEPICSCAInput::Execute(ExecutionInfo& info) {
|
||||
ErrorManagement::ErrorType err = ErrorManagement::NoError;
|
||||
if (info.GetStage() == ExecutionInfo::StartupStage) {
|
||||
(void) eventCallbackFastMux.FastLock();
|
||||
/*lint -e{9130} -e{835} -e{845} -e{747} Several false positives. lint is getting confused here for some reason.*/
|
||||
if (ca_context_create(ca_enable_preemptive_callback) != ECA_NORMAL) {
|
||||
err = ErrorManagement::FatalError;
|
||||
REPORT_ERROR(err, "ca_enable_preemptive_callback failed");
|
||||
}
|
||||
|
||||
uint32 n;
|
||||
uint32 nOfSignals = GetNumberOfSignals();
|
||||
if (pvs != NULL_PTR(PVWrapper *)) {
|
||||
for (n = 0u; (n < nOfSignals); n++) {
|
||||
/*lint -e{9130} -e{835} -e{845} -e{747} Several false positives. lint is getting confused here for some reason.*/
|
||||
if (ca_create_channel(&pvs[n].pvName[0], NULL_PTR(caCh *), NULL_PTR(void *), 20u, &pvs[n].pvChid) != ECA_NORMAL) {
|
||||
err = ErrorManagement::FatalError;
|
||||
REPORT_ERROR(err, "ca_create_channel failed for PV with name %s", pvs[n].pvName);
|
||||
}
|
||||
if (err.ErrorsCleared()) {
|
||||
/*lint -e{9130} -e{835} -e{845} -e{747} Several false positives. lint is getting confused here for some reason.*/
|
||||
if (ca_create_subscription(pvs[n].pvType, pvs[n].numberOfElements, pvs[n].pvChid, DBE_VALUE, &JAEPICSCAInputEventCallback, &pvs[n],
|
||||
&pvs[n].pvEvid) != ECA_NORMAL) {
|
||||
err = ErrorManagement::FatalError;
|
||||
REPORT_ERROR(err, "ca_create_subscription failed for PV %s", pvs[n].pvName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
eventCallbackFastMux.FastUnLock();
|
||||
}
|
||||
else if (info.GetStage() != ExecutionInfo::BadTerminationStage) {
|
||||
Sleep::Sec(1.0F);
|
||||
}
|
||||
else {
|
||||
(void) eventCallbackFastMux.FastLock();
|
||||
uint32 n;
|
||||
uint32 nOfSignals = GetNumberOfSignals();
|
||||
if (pvs != NULL_PTR(PVWrapper *)) {
|
||||
for (n = 0u; (n < nOfSignals); n++) {
|
||||
(void) ca_clear_subscription(pvs[n].pvEvid);
|
||||
(void) ca_clear_event(pvs[n].pvEvid);
|
||||
(void) ca_clear_channel(pvs[n].pvChid);
|
||||
}
|
||||
}
|
||||
ca_detach_context();
|
||||
ca_context_destroy();
|
||||
eventCallbackFastMux.FastUnLock();
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
uint32 JAEPICSCAInput::GetStackSize() const {
|
||||
return stackSize;
|
||||
}
|
||||
|
||||
uint32 JAEPICSCAInput::GetCPUMask() const {
|
||||
return cpuMask;
|
||||
}
|
||||
|
||||
bool JAEPICSCAInput::Synchronise() {
|
||||
return false;
|
||||
}
|
||||
|
||||
CLASS_REGISTER(JAEPICSCAInput, "1.0")
|
||||
|
||||
}
|
||||
|
||||
@@ -1,260 +0,0 @@
|
||||
/**
|
||||
* @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_ */
|
||||
|
||||
@@ -1,375 +0,0 @@
|
||||
/**
|
||||
* @file EPICSCAOutput.cpp
|
||||
* @brief Source file for class EPICSCAOutput
|
||||
* @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 source file contains the definition of all the methods for
|
||||
* the class EPICSCAOutput (public, protected, and private). Be aware that some
|
||||
* methods, such as those inline could be defined on the header file, instead.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Standard header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "JAEPICSCAOutput.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "AdvancedErrorManagement.h"
|
||||
#include "MemoryMapAsyncOutputBroker.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Static definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
namespace MARTe {
|
||||
JAEPICSCAOutput::JAEPICSCAOutput() :
|
||||
DataSourceI() {
|
||||
pvs = NULL_PTR(PVWrapper *);
|
||||
stackSize = THREADS_DEFAULT_STACKSIZE * 4u;
|
||||
cpuMask = 0xffu;
|
||||
numberOfBuffers = 0u;
|
||||
ignoreBufferOverrun = 1u;
|
||||
threadContextSet = false;
|
||||
}
|
||||
|
||||
/*lint -e{1551} must free the memory allocated to the different PVs.*/
|
||||
JAEPICSCAOutput::~JAEPICSCAOutput() {
|
||||
uint32 nOfSignals = GetNumberOfSignals();
|
||||
if (pvs != NULL_PTR(PVWrapper *)) {
|
||||
uint32 n;
|
||||
for (n = 0u; (n < nOfSignals); n++) {
|
||||
if (pvs[n].pvChid != NULL_PTR(chid)) {
|
||||
(void) ca_clear_channel(pvs[n].pvChid);
|
||||
}
|
||||
if (pvs[n].memory != NULL_PTR(void *)) {
|
||||
GlobalObjectsDatabase::Instance()->GetStandardHeap()->Free(pvs[n].memory);
|
||||
GlobalObjectsDatabase::Instance()->GetStandardHeap()->Free(pvs[n].previousValue);
|
||||
}
|
||||
}
|
||||
delete[] pvs;
|
||||
}
|
||||
}
|
||||
|
||||
bool JAEPICSCAOutput::Initialise(StructuredDataI & data) {
|
||||
bool ok = DataSourceI::Initialise(data);
|
||||
if (ok) {
|
||||
ok = data.Read("NumberOfBuffers", numberOfBuffers);
|
||||
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "NumberOfBuffers shall be specified");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
if (!data.Read("CPUs", cpuMask)) {
|
||||
REPORT_ERROR(ErrorManagement::Information, "No CPUs defined. Using default = %d", cpuMask);
|
||||
}
|
||||
if (!data.Read("StackSize", stackSize)) {
|
||||
REPORT_ERROR(ErrorManagement::Information, "No StackSize defined. Using default = %d", stackSize);
|
||||
}
|
||||
if (!data.Read("IgnoreBufferOverrun", ignoreBufferOverrun)) {
|
||||
REPORT_ERROR(ErrorManagement::Information, "No IgnoreBufferOverrun defined. Using default = %d", ignoreBufferOverrun);
|
||||
}
|
||||
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.MoveRelative("Signals");
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Could not move to the Signals section");
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.Copy(originalSignalInformation);
|
||||
}
|
||||
if (ok) {
|
||||
ok = originalSignalInformation.MoveToRoot();
|
||||
}
|
||||
//Do not allow to add signals in run-time
|
||||
if (ok) {
|
||||
ok = signalsDatabase.MoveRelative("Signals");
|
||||
}
|
||||
if (ok) {
|
||||
ok = signalsDatabase.Write("Locked", 1u);
|
||||
}
|
||||
if (ok) {
|
||||
ok = signalsDatabase.MoveToAncestor(1u);
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
ok = data.MoveToAncestor(1u);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAEPICSCAOutput::SetConfiguredDatabase(StructuredDataI & data) {
|
||||
bool ok = DataSourceI::SetConfiguredDatabase(data);
|
||||
//Check the signal index of the timing signal.
|
||||
uint32 nOfSignals = GetNumberOfSignals();
|
||||
if (ok) {
|
||||
ok = (nOfSignals > 0u);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "At least one signal shall be defined");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
//Do not allow samples
|
||||
uint32 functionNumberOfSignals = 0u;
|
||||
uint32 n;
|
||||
if (GetFunctionNumberOfSignals(OutputSignals, 0u, functionNumberOfSignals)) {
|
||||
for (n = 0u; (n < functionNumberOfSignals) && (ok); n++) {
|
||||
uint32 nSamples;
|
||||
ok = GetFunctionSignalSamples(OutputSignals, 0u, n, nSamples);
|
||||
if (ok) {
|
||||
ok = (nSamples == 1u);
|
||||
}
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "The number of samples shall be exactly 1");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Only one and one GAM allowed to interact with this DataSourceI
|
||||
if (ok) {
|
||||
ok = (GetNumberOfFunctions() == 1u);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Exactly one Function allowed to interact with this DataSourceI");
|
||||
}
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
pvs = new PVWrapper[nOfSignals];
|
||||
uint32 n;
|
||||
for (n = 0u; (n < nOfSignals); n++) {
|
||||
pvs[n].memory = NULL_PTR(void *); //value to write PV
|
||||
pvs[n].previousValue = NULL_PTR(void *); //written value
|
||||
pvs[n].pvChid = NULL_PTR(chid);
|
||||
|
||||
}
|
||||
for (n = 0u; (n < nOfSignals) && (ok); n++) {
|
||||
//Note that the RealTimeApplicationConfigurationBuilder is allowed to change the order of the signals w.r.t. to the originalSignalInformation
|
||||
StreamString orderedSignalName;
|
||||
ok = GetSignalName(n, orderedSignalName);
|
||||
if (ok) {
|
||||
//Have to mix and match between the original setting of the DataSource signal
|
||||
//and the ones which are later added by the RealTimeApplicationConfigurationBuilder
|
||||
ok = originalSignalInformation.MoveRelative(orderedSignalName.Buffer());
|
||||
}
|
||||
StreamString pvName;
|
||||
if (ok) {
|
||||
ok = originalSignalInformation.Read("PVName", pvName);
|
||||
if (!ok) {
|
||||
uint32 nn = n;
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "No PVName specified for signal at index %d", nn);
|
||||
}
|
||||
}
|
||||
TypeDescriptor td = GetSignalType(n);
|
||||
|
||||
if (ok) {
|
||||
(void) StringHelper::CopyN(&pvs[n].pvName[0], pvName.Buffer(), PV_NAME_MAX_SIZE);
|
||||
if (td == CharString) {
|
||||
pvs[n].pvType = DBR_STRING;
|
||||
}
|
||||
else if (td == Character8Bit) {
|
||||
pvs[n].pvType = DBR_STRING;
|
||||
}
|
||||
else if (td == SignedInteger8Bit) {
|
||||
pvs[n].pvType = DBR_CHAR;
|
||||
}
|
||||
else if (td == UnsignedInteger8Bit) {
|
||||
pvs[n].pvType = DBR_CHAR;
|
||||
}
|
||||
else if (td == SignedInteger16Bit) {
|
||||
pvs[n].pvType = DBR_SHORT;
|
||||
}
|
||||
else if (td == UnsignedInteger16Bit) {
|
||||
pvs[n].pvType = DBR_SHORT;
|
||||
}
|
||||
else if (td == SignedInteger32Bit) {
|
||||
pvs[n].pvType = DBR_LONG;
|
||||
}
|
||||
else if (td == UnsignedInteger32Bit) {
|
||||
pvs[n].pvType = DBR_LONG;
|
||||
}
|
||||
else if (td == Float32Bit) {
|
||||
pvs[n].pvType = DBR_FLOAT;
|
||||
}
|
||||
else if (td == Float64Bit) {
|
||||
pvs[n].pvType = DBR_DOUBLE;
|
||||
}
|
||||
else {
|
||||
REPORT_ERROR(ErrorManagement::ParametersError, "Type %s is not supported", TypeDescriptor::GetTypeNameFromTypeDescriptor(td));
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
uint32 numberOfElements = 1u;
|
||||
if (ok) {
|
||||
ok = GetSignalNumberOfElements(n, numberOfElements);
|
||||
}
|
||||
if (ok) {
|
||||
if (pvs[n].pvType == DBR_STRING) {
|
||||
ok = (numberOfElements == 40u);
|
||||
}
|
||||
if (!ok) {
|
||||
//Could support arrays of strings with multiples of char8[40]
|
||||
REPORT_ERROR(ErrorManagement::ParametersError,
|
||||
"Strings shall be defined with 40 elements char8[40]. Arrays of strings are not currently supported");
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
pvs[n].numberOfElements = numberOfElements;
|
||||
}
|
||||
if (ok) {
|
||||
pvs[n].memorySize = td.numberOfBits;
|
||||
pvs[n].memorySize /= 8u;
|
||||
pvs[n].memorySize *= numberOfElements;
|
||||
pvs[n].memory = GlobalObjectsDatabase::Instance()->GetStandardHeap()->Malloc(pvs[n].memorySize);
|
||||
pvs[n].previousValue = GlobalObjectsDatabase::Instance()->GetStandardHeap()->Malloc(pvs[n].memorySize);
|
||||
ok = originalSignalInformation.MoveToAncestor(1u);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAEPICSCAOutput::AllocateMemory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 JAEPICSCAOutput::GetNumberOfMemoryBuffers() {
|
||||
return 1u;
|
||||
}
|
||||
|
||||
/*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: The signalAddress is independent of the bufferIdx.*/
|
||||
bool JAEPICSCAOutput::GetSignalMemoryBuffer(const uint32 signalIdx, const uint32 bufferIdx, void*& signalAddress) {
|
||||
bool ok = (pvs != NULL_PTR(PVWrapper *));
|
||||
if (ok) {
|
||||
ok = (signalIdx < GetNumberOfSignals());
|
||||
}
|
||||
if (ok) {
|
||||
//lint -e{613} pvs cannot as otherwise ok would be false
|
||||
signalAddress = pvs[signalIdx].memory;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
/*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: The brokerName only depends on the direction */
|
||||
const char8* JAEPICSCAOutput::GetBrokerName(StructuredDataI& data, const SignalDirection direction) {
|
||||
const char8* brokerName = "";
|
||||
if (direction == OutputSignals) {
|
||||
brokerName = "MemoryMapAsyncOutputBroker";
|
||||
}
|
||||
return brokerName;
|
||||
}
|
||||
|
||||
/*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: InputBrokers are not supported. Function returns false irrespectively of the parameters.*/
|
||||
bool JAEPICSCAOutput::GetInputBrokers(ReferenceContainer& inputBrokers, const char8* const functionName, void* const gamMemPtr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool JAEPICSCAOutput::GetOutputBrokers(ReferenceContainer& outputBrokers, const char8* const functionName, void* const gamMemPtr) {
|
||||
ReferenceT<MemoryMapAsyncOutputBroker> broker("MemoryMapAsyncOutputBroker");
|
||||
bool ok = broker->InitWithBufferParameters(OutputSignals, *this, functionName, gamMemPtr, numberOfBuffers, cpuMask, stackSize);
|
||||
if (ok) {
|
||||
ok = outputBrokers.Insert(broker);
|
||||
broker->SetIgnoreBufferOverrun(ignoreBufferOverrun == 1u);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
/*lint -e{715} [MISRA C++ Rule 0-1-11], [MISRA C++ Rule 0-1-12]. Justification: NOOP at StateChange, independently of the function parameters.*/
|
||||
bool JAEPICSCAOutput::PrepareNextState(const char8* const currentStateName, const char8* const nextStateName) {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 JAEPICSCAOutput::GetStackSize() const {
|
||||
return stackSize;
|
||||
}
|
||||
|
||||
uint32 JAEPICSCAOutput::GetCPUMask() const {
|
||||
return cpuMask;
|
||||
}
|
||||
|
||||
uint32 JAEPICSCAOutput::GetNumberOfBuffers() const {
|
||||
return numberOfBuffers;
|
||||
}
|
||||
|
||||
bool JAEPICSCAOutput::Synchronise() {
|
||||
bool ok = true;
|
||||
uint32 n;
|
||||
uint32 nOfSignals = GetNumberOfSignals();
|
||||
if (!threadContextSet) {
|
||||
ok = (ca_context_create(ca_enable_preemptive_callback) == ECA_NORMAL);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::FatalError, "ca_enable_preemptive_callback failed");
|
||||
}
|
||||
threadContextSet = ok;
|
||||
if (pvs != NULL_PTR(PVWrapper *)) {
|
||||
for (n = 0u; (n < nOfSignals); n++) {
|
||||
ok = (ca_create_channel(&pvs[n].pvName[0], NULL_PTR(caCh *), NULL_PTR(void *), 20u, &pvs[n].pvChid) == ECA_NORMAL);
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::FatalError, "ca_create_channel failed for PV with name %s", pvs[n].pvName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Allow to write event at the first time!
|
||||
if (threadContextSet) {
|
||||
if (pvs != NULL_PTR(PVWrapper *)) {
|
||||
for (n = 0u; (n < nOfSignals); n++) {
|
||||
bool isNewValue = true;
|
||||
if (pvs[n].pvType == DBR_STRING) {
|
||||
if(strcmp((char*)pvs[n].memory,(char*)pvs[n].previousValue)==0){
|
||||
isNewValue = false;
|
||||
continue;
|
||||
}
|
||||
if(isNewValue){
|
||||
ok = (ca_put(pvs[n].pvType, pvs[n].pvChid, pvs[n].memory) == ECA_NORMAL);
|
||||
memcpy(pvs[n].previousValue,pvs[n].memory, pvs[n].numberOfElements);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(memcmp(pvs[n].memory, pvs[n].previousValue, pvs[n].numberOfElements)==0){
|
||||
isNewValue = false;
|
||||
continue;
|
||||
}
|
||||
if(isNewValue){
|
||||
ok = (ca_array_put(pvs[n].pvType, pvs[n].numberOfElements, pvs[n].pvChid, pvs[n].memory) == ECA_NORMAL);
|
||||
memcpy(pvs[n].previousValue, pvs[n].memory, pvs[n].numberOfElements);
|
||||
}
|
||||
}
|
||||
if (!ok) {
|
||||
REPORT_ERROR(ErrorManagement::FatalError, "ca_put failed for PV: %s", pvs[n].pvName);
|
||||
}
|
||||
(void) ca_pend_io(0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool JAEPICSCAOutput::IsIgnoringBufferOverrun() const {
|
||||
return (ignoreBufferOverrun == 1u);
|
||||
}
|
||||
|
||||
CLASS_REGISTER(JAEPICSCAOutput, "1.0")
|
||||
|
||||
}
|
||||
|
||||
@@ -1,233 +0,0 @@
|
||||
/**
|
||||
* @file EPICSCAOutput.h
|
||||
* @brief Header file for class EPICSCAOutput
|
||||
* @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 EPICSCAOutput
|
||||
* 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 JAEPICSCAOutput_H_
|
||||
#define JAEPICSCAOutput_H_
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Standard header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include <cadef.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Project header includes */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#include "DataSourceI.h"
|
||||
#include "JAEPICSCAInput.h"
|
||||
#include "EmbeddedServiceMethodBinderI.h"
|
||||
#include "EventSem.h"
|
||||
#include "SingleThreadService.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Class declaration */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
namespace MARTe {
|
||||
//Maximum size that a PV name may have
|
||||
|
||||
/**
|
||||
* @brief A DataSource which allows to output data into any number of PVs using the EPICS channel access client protocol.
|
||||
* Data is asynchronously ca_put 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>
|
||||
* +EPICSCAOutput_1 = {
|
||||
* Class = EPICSCA::EPICSCAOutput
|
||||
* 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).
|
||||
* IgnoreBufferOverrun = 1 //Optional. If true no error will be triggered when the thread that writes into EPICS does not consume the data fast enough.
|
||||
* NumberOfBuffers = 10 //Compulsory. Number of buffers in a circular buffer that asynchronously writes the PV values. Each buffer is capable of holding a copy of all the DataSourceI signals.
|
||||
* 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, float32 and float64
|
||||
* }
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
class JAEPICSCAOutput: public DataSourceI {
|
||||
public:
|
||||
CLASS_REGISTER_DECLARATION()
|
||||
|
||||
/**
|
||||
* @brief Default constructor. NOOP.
|
||||
*/
|
||||
JAEPICSCAOutput();
|
||||
|
||||
/**
|
||||
* @brief Destructor.
|
||||
* @details TODO.
|
||||
*/
|
||||
virtual ~JAEPICSCAOutput();
|
||||
|
||||
/**
|
||||
* @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 OutputSignals are supported.
|
||||
* @return MemoryMapAsyncOutputBroker.
|
||||
*/
|
||||
virtual const char8 *GetBrokerName(StructuredDataI &data,
|
||||
const SignalDirection direction);
|
||||
|
||||
/**
|
||||
* @brief See DataSourceI::GetInputBrokers.
|
||||
* @return false.
|
||||
*/
|
||||
virtual bool GetInputBrokers(ReferenceContainer &inputBrokers,
|
||||
const char8* const functionName,
|
||||
void * const gamMemPtr);
|
||||
|
||||
/**
|
||||
* @brief See DataSourceI::GetOutputBrokers.
|
||||
* @details adds a memory MemoryMapOutputBroker instance to the outputBrokers
|
||||
* @return true.
|
||||
*/
|
||||
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 write data with ca_put.
|
||||
* @return the affinity of the thread which is going to be used to asynchronously write data with ca_put.
|
||||
*/
|
||||
uint32 GetCPUMask() const;
|
||||
|
||||
/**
|
||||
* @brief Gets the stack size of the thread which is going to be used to asynchronously write data with ca_put.
|
||||
* @return the stack size of the thread which is going to be used to asynchronously write data with ca_put.
|
||||
*/
|
||||
uint32 GetStackSize() const;
|
||||
|
||||
/**
|
||||
* @brief Gets the number of buffers in the circular buffer that asynchronously writes the PV values.
|
||||
* @return the number of buffers in the circular buffer that asynchronously writes the PV values.
|
||||
*/
|
||||
uint32 GetNumberOfBuffers() const;
|
||||
|
||||
/**
|
||||
* @brief Provides the context to execute all the EPICS ca_put calls.
|
||||
* @details Executes in the context of the MemoryMapAsyncOutputBroker 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 true if all the EPICS calls return without any error.
|
||||
*/
|
||||
virtual bool Synchronise();
|
||||
|
||||
/**
|
||||
* @brief Gets if buffer overruns is being ignored (i.e. the consumer thread which writes into EPICS is not consuming the data fast enough).
|
||||
* @return if true no error is to be triggered when there is a buffer overrun.
|
||||
*/
|
||||
bool IsIgnoringBufferOverrun() const;
|
||||
|
||||
|
||||
private:
|
||||
/**
|
||||
* List of PVs.
|
||||
*/
|
||||
PVWrapper *pvs;
|
||||
|
||||
/**
|
||||
* The CPU mask for the executor
|
||||
*/
|
||||
uint32 cpuMask;
|
||||
|
||||
/**
|
||||
* The stack size
|
||||
*/
|
||||
uint32 stackSize;
|
||||
|
||||
/**
|
||||
* Stores the configuration information received at Initialise.
|
||||
*/
|
||||
ConfigurationDatabase originalSignalInformation;
|
||||
|
||||
/**
|
||||
* The number of buffers for the circular buffer that flushes data into EPICS
|
||||
*/
|
||||
uint32 numberOfBuffers;
|
||||
|
||||
/**
|
||||
* True once the epics thread context is set
|
||||
*/
|
||||
bool threadContextSet;
|
||||
|
||||
/**
|
||||
* If true no error will be triggered when the data cannot be consumed by the thread doing the caputs.
|
||||
*/
|
||||
uint32 ignoreBufferOverrun;
|
||||
};
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Inline method definitions */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#endif /* EPICSCADATASOURCE_H_ */
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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 for the specific language governing
|
||||
# permissions and limitations under the Licence.
|
||||
#
|
||||
# $Id: Makefile.gcc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
LIBRARIES += -L$(EPICS_BASE)/lib/$(EPICS_HOST_ARCH)/ -lca
|
||||
@@ -1,58 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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 for the specific language governing
|
||||
# permissions and limitations under the Licence.
|
||||
#
|
||||
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
OBJSX=JAEPICSCAOutput.x JAEPICSCAInput.x
|
||||
|
||||
PACKAGE=DataSources
|
||||
|
||||
ROOT_DIR=../../
|
||||
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
|
||||
|
||||
INCLUDES += -I.
|
||||
INCLUDES += -I$(EPICS_BASE)/include/
|
||||
INCLUDES += -I$(EPICS_BASE)/include/os/Linux/
|
||||
INCLUDES += -I$(EPICS_BASE)/include/compiler/gcc/
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L0Types
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L1Portability
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L2Objects
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L3Streams
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L4Messages
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L4Configuration
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L5GAMs
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L1Portability
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L3Services
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L4Messages
|
||||
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L5GAMs
|
||||
|
||||
all: $(OBJS) $(SUBPROJ) \
|
||||
$(BUILD_DIR)/JAEPICSCA$(LIBEXT) \
|
||||
$(BUILD_DIR)/JAEPICSCA$(DLLEXT)
|
||||
echo $(OBJS)
|
||||
|
||||
include depends.$(TARGET)
|
||||
|
||||
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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 for the specific language governing
|
||||
# permissions and limitations under the Licence.
|
||||
#
|
||||
#############################################################
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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 for the specific language governing
|
||||
# permissions and limitations under the Licence.
|
||||
#
|
||||
# $Id: Makefile.gcc 3 2012-01-15 16:26:07Z aneto $
|
||||
#
|
||||
#############################################################
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
LIBRARIES += -L$(CODAC_ROOT)/lib/ -lpxi6528
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user