Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions pydevices/RfxDevices/MARTE2_COMPONENT.py
Original file line number Diff line number Diff line change
Expand Up @@ -2738,6 +2738,8 @@ def getMarteInputInfo(self, threadMap, gams, dataSources, gamList, isSynch):
if outputDict['seg_len'] > 0:
gamText += ' '+outputDict['name'] + ' = {\n'
gamText += ' DataSource = '+dataSourceName+'_Output_DDB\n'
gamText += ' NumberOfElemenrs = '+str(outputDict['elements'])
gamText += ' Type = '+outputDict['type']
gamText += ' }\n'

gamText += ' }\n'
Expand Down Expand Up @@ -2891,7 +2893,7 @@ def getMarteInputInfo(self, threadMap, gams, dataSources, gamList, isSynch):
gamText += ' }\n'
gams.append(gamText)

# Some outputs are connected to devices on separate synchronized theads
# Some outputs are connected to devices on separate synchronized threads
if len(asynchThreadSignals) > 0:
dataSourceText = ' +'+dataSourceName+'_Output_Asynch = {\n'
dataSourceText += ' Class = RealTimeThreadAsyncBridge\n'
Expand All @@ -2910,11 +2912,11 @@ def getMarteInputInfo(self, threadMap, gams, dataSources, gamList, isSynch):
isInputStructField = False
gamText += ' '+signalDict['name']+' = {\n'
if isInputStructField:
gamText += ' DataSource = '+gamName+'_Expanded_Output_DDB\n'
gamText += ' DataSource = '+dataSourceName+'_Expanded_Output_DDB\n'
else:
gamText += ' DataSource = '+gamName+'_Output_DDB\n'
gamText += ' NumberOfDimensions = ' + \
str(signalDict['dimensions'])+'\n'
gamText += ' DataSource = '+dataSourceName+'_Output_DDB\n'
# gamText += ' NumberOfDimensions = ' + \
# str(signalDict['dimensions'])+'\n'
gamText += ' NumberOfElements = ' + \
str(signalDict['elements'])+'\n'
gamText += ' }\n'
Expand All @@ -2923,8 +2925,8 @@ def getMarteInputInfo(self, threadMap, gams, dataSources, gamList, isSynch):
for signalDict in asynchThreadSignals:
gamText += ' '+signalDict['name']+' = {\n'
gamText += ' DataSource = '+dataSourceName+'_Output_Asynch\n'
gamText += ' NumberOfDimensions = ' + \
str(signalDict['dimensions'])+'\n'
# gamText += ' NumberOfDimensions = ' + \
# str(signalDict['dimensions'])+'\n'
gamText += ' NumberOfElements = ' + \
str(signalDict['elements'])+'\n'
gamText += ' }\n'
Expand Down
6 changes: 5 additions & 1 deletion pydevices/RfxDevices/MARTE2_SUPERVISOR.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,11 @@ def stopMarte(self):
# KILL MARTe process
import subprocess
import os

command = 'kill -KILL `ps -Af | grep %s_marte_configuration.cfg | grep MARTeApp.ex | grep -v grep | awk \'{print $2}\'`' % (marteName)
os.system(command)
return 1

command = 'ps -Af | grep %s_marte_configuration.cfg | grep MARTeApp.ex | grep -v grep | awk \'{print $2}\'' % (
marteName)
pid, error = subprocess.Popen("{cmd}".format(
Expand All @@ -655,7 +660,6 @@ def stopMarte(self):
for p in pid.split():
os.kill(int(p), 9)
print('MARTe Process PID : %s Killed\n' % (p))
return 1

def check(self):
t = self.getTree()
Expand Down