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,38 @@
from org.csstudio.opibuilder.scriptUtil import PVUtil
from org.csstudio.opibuilder.scriptUtil import DataUtil
from org.csstudio.opibuilder.scriptUtil import ScriptUtil
from org.csstudio.swt.widgets.natives.SpreadSheetTable import ITableSelectionChangedListener
from java.util import Arrays
table = widget.getTable()
fct_name=display.getPropertyValue("name")
class SelectionListener(ITableSelectionChangedListener):
def selectionChanged(self, selection):
cuName=""
phyName=""
plcIocHlts =""
cuType=""
for row in selection:
phyName=row[1]
cuName=row[0]
plcIocHlts=row[6]
cuType=row[7];
# change $(CU) substitution
macroInput = DataUtil.createMacrosInput(True)
macroInput.put("CU", cuName)
macroInput.put("PHY_NAME", phyName)
macroInput.put("FCT_NAME", fct_name)
macroInput.put("CU_TYPE", cuType)
if plcIocHlts == "":
macroInput.put("SHOW_PLC_IOC", "false")
else:
macroInput.put("SHOW_PLC_IOC", "true")
# open OPI
# see https://svnpub.iter.org/codac/iter/codac/dev/units/m-css-boy/trunk/org.csstudio.opibuilder/src/org/csstudio/opibuilder/scriptUtil/ScriptUtil.java
if cuType == "POC with CA":
ScriptUtil.openOPI(display.getWidget("Table"), fct_name+"-POCWithCADetails.opi", 1, macroInput)
elif cuType == "POC without CA":
ScriptUtil.openOPI(display.getWidget("Table"), fct_name+"-POCWithoutCADetails.opi", 1, macroInput)
else:
ScriptUtil.openOPI(display.getWidget("Table"), fct_name+"-CtrlUnitDetails.opi", 1, macroInput)
table.addSelectionChangedListener(SelectionListener())

View File

@@ -0,0 +1,45 @@
#############################################################
#
# 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 $
#
#############################################################
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
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
ROOT_DIR=../../../obj
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
all: $(OBJS) $(SUBPROJ) check-env
echo $(OBJS)
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)
check-env:
ifndef MARTe2_DIR
$(error MARTe2_DIR is undefined)
endif

View File

@@ -0,0 +1,55 @@
#############################################################
#
# 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=JATerminalInterfaceGAM.x
PACKAGE=GAMs
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$(MARTe2_DIR)/Source/Core/FileSystem/L1Portability
INCLUDES += -I$(MARTe2_DIR)/Source/Core/FileSystem/L3Streams
all: $(OBJS) $(SUBPROJ) \
$(BUILD_DIR)/JATerminalInterfaceGAM$(LIBEXT) \
$(BUILD_DIR)/JATerminalInterfaceGAM$(DLLEXT)
echo $(OBJS)
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)