Generation working and Compilation of MARTe components

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

View File

@@ -0,0 +1,4 @@
#!/bin/sh
./Main.sh -f ../Configurations/tests/NI6528_NI6259_test.cfg -l RealTimeLoader -m StateMachine:START

View File

@@ -0,0 +1,42 @@
############################################################################
## Save and restore
############################################################################
### save_restore setup
# status-PV prefix
save_restoreSet_status_prefix("$(AUTOSAVE_SYSM_PV_PREFIX)")
# Use status-PV
save_restoreSet_UseStatusPVs(1)
# Debug-output level
save_restoreSet_Debug(0)
# Ok to save/restore save sets with missing values (no CA connection to PV)?
save_restoreSet_IncompleteSetsOk(1)
# Save dated backup files?
save_restoreSet_DatedBackupFiles(1)
# Number of sequenced backup files to write
save_restoreSet_NumSeqFiles(3)
# Time interval between sequenced backups
save_restoreSet_SeqPeriodInSeconds(300)
# specify where save files should be
set_savefile_path("$(EPICS_AUTOSAVE_VAR)/$(UNIT_NAME)")
# specify what save files should be restored. Note these files must be
# in the directory specified in set_savefile_path(), or, if that function
# has not been called, from the directory current when iocInit is invoked
# Save files associated with the request files 'auto-output.req' and
# 'auto-input.req'. These files are the standard way to use autosave
set_pass1_restoreFile("iocEC-GN-PSH0PCF.sav")
# specify directories in which to to search for included request files
set_requestfile_path("./")
dbLoadRecords("$(EPICS_ROOT)/db/save_restoreStatus.db", "P=$(AUTOSAVE_SYSM_PV_PREFIX)")
#- End-of-file marker - do not delete or add lines below!

View File

@@ -0,0 +1,123 @@
/**
* @file JABitReverseGAM.cpp
* @brief Source file for class JABitReverseGAM
* @date Nov 26, 2018
* @author aneto
*
* @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 JABitReverseGAM (public, protected, and private). Be aware that some
* methods, such as those inline could be defined on the header file, instead.
*/
/*---------------------------------------------------------------------------*/
/* Standard header includes */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "JABitReverseGAM.h"
#include "AdvancedErrorManagement.h"
/*---------------------------------------------------------------------------*/
/* Static definitions */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Method definitions */
/*---------------------------------------------------------------------------*/
JABitReverseGAM::JABitReverseGAM() {
//Input signals.
input1 = NULL_PTR(MARTe::uint8 *);
//Output signals.
output1= NULL_PTR(MARTe::uint8 *);
}
JABitReverseGAM::~JABitReverseGAM() {
}
bool JABitReverseGAM::Initialise(MARTe::StructuredDataI & data) {
//GAM parameters are initialized.
using namespace MARTe;
bool ok = GAM::Initialise(data);
return ok;
}
bool JABitReverseGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
//This method changes internal parameter based on next realtime state.
return true;
}
bool JABitReverseGAM::Setup() {
// Setup memory for input/output signals on the GAM.
using namespace MARTe;
bool ok = (numberOfInputSignals == 1u);
if (ok) {
ok = (numberOfOutputSignals == 1u);
if (!ok) {
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "One output signal shall be defined");
}
}
else {
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "One input signals shall be defined");
}
// Do type check for input signals.
if (ok) {
uint32 c;
for (c = 0u; c < numberOfInputSignals; c++) {
TypeDescriptor inputType = GetSignalType(InputSignals, c);
ok = ((inputType == UnsignedInteger8Bit));
if (!ok) {
StreamString signalName;
(void) GetSignalName(InputSignals, c, signalName);
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as uint8.", signalName.Buffer());
}
}
}
// Do type check for output signals
if (ok) {
uint32 c;
for (c = 0u; c < numberOfOutputSignals; c++) {
TypeDescriptor outputType = GetSignalType(OutputSignals, c);
ok = ((outputType == UnsignedInteger8Bit));
if (!ok) {
StreamString signalName;
(void) GetSignalName(InputSignals, c, signalName);
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as uint8.", signalName.Buffer());
}
}
}
// Do type cast.
if (ok) {
input1 = reinterpret_cast<uint8 *>(GetInputSignalMemory(0));
output1 = reinterpret_cast<uint8 *>(GetOutputSignalMemory(0));
}
return ok;
}
bool JABitReverseGAM::Execute() {
// This method is called every realtime state thread cycle.
using namespace MARTe;
*output1 = ~(*input1);
return true;
}
CLASS_REGISTER(JABitReverseGAM, "1.0")