Commit a4c38f42 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
parents f5469b9a 5b423b98
Subproject commit 55601c78cba5058ed692e1793f5e13fd1d1a4dad
Subproject commit c4f685a193600706c7503232d039d01b8e2cb29b
#!/bin/bash
# TASTE Concurrency View Creator
# Logging with colors (only in a terminal)
if [ -t 1 ] ; then
COLORON="\e[1m\e[32m"
COLOROFF="\e[0m"
else
COLORON=""
COLOROFF=""
fi
INFO="${COLORON}[INFO]${COLOROFF}"
ERROR="${COLORON}[ERROR]${COLOROFF}"
error=0
NB_ARGS=3
......@@ -32,10 +44,23 @@ else
fi
fi
# Check if models are from V2 and convert to V1_3 accordingly
V2=0
grep "version => \"2" InterfaceView.aadl >/dev/null && {
echo -e "${INFO} Converting interface view from V2 to V1.3"
TASTE --load-interface-view InterfaceView.aadl --export-interface-view-to-1_3 __iv_1_3.aadl
INTERFACEVIEW=__iv_1_3.aadl
echo -e "${INFO} Converting deployment view from V2 to V1.3"
TASTE --load-deployment-view "$DEPLOYMENTVIEW" --export-deployment-view-to-1_3 __dv_1_3.aadl
DEPLOYMENTVIEW=__dv_1_3.aadl
V2=1
};
if [ $error -eq 1 ]
then
echo 'If you are using custom names for interface, deployment and data views, please specify them in order:
Usage: taste-edit-concurrency-view InterfaceView.aadl DeploymentView.aadl DataView.aadl'
echo -e "${ERROR} If you are using custom names for interface, deployment and data views, please specify them in order:
Usage: taste-edit-concurrency-view InterfaceView.aadl DeploymentView.aadl DataView.aadl"
exit -1
fi
......@@ -72,10 +97,10 @@ then
done
PROCESS+=,$OCARINA_COMPONENTS
else
echo "The following command failed:
echo -e "${ERROR} The following command failed:
${CMD}
"
echo 'Buildsupport reported errors - Fix your models before you can edit the Concurrency View'
echo -e "${ERROR} Buildsupport reported errors - Fix your models before you can edit the Concurrency View"
exit -2
fi
......@@ -88,4 +113,12 @@ From this tool you may:
PROPERTIES=ConcurrencyView.pro
[ ! -z $DEBUG ] && echo TASTE-CV --edit-aadl $PROCESS --update-properties $PROPERTIES
TASTE-CV --edit-aadl $PROCESS --update-properties $PROPERTIES
if [ $V2 -eq 0 ]
then
TASTE-CV --edit-aadl $PROCESS --update-properties $PROPERTIES
else
rm -rf ConcurrencyView
mv "$tempdir"/ConcurrencyView .
fi
......@@ -40,9 +40,9 @@ if [ ! -f DeploymentView.aadl ]
then
EXTRA_CMD+=--load-interface-view
EXTRA_CMD+=' InterfaceView.aadl'
EXTRA_CMD+=' --aadl-library $(taste-config --prefix)/share/ocarina/AADLv2/ocarina_components.aadl '
EXTRA_CMD+=" --aadl-library $(taste-config --prefix)/share/ocarina/AADLv2/ocarina_components.aadl "
else
EXTRA_CMD=
EXTRA_CMD+=' --load-deployment-view DeploymentView.aadl '
fi
# Add the components from the components library
......@@ -62,6 +62,5 @@ done
echo -e "${INFO} Running
TASTE $EXTRA_CMD
--load-deployment-view DeploymentView.aadl
"
TASTE $EXTRA_CMD --load-deployment-view DeploymentView.aadl
TASTE $EXTRA_CMD
......@@ -55,6 +55,8 @@ $ FORCE=1 taste-generate-skeletons
fi
fi
md5sum "$INTERFACEVIEW" > InterfaceView.md5
# Detect models from Ellidiss tools v2, and convert them to 1.3
grep "version => \"2" "$INTERFACEVIEW" >/dev/null && {
echo '[INFO] Converting interface view from V2 to V1.3'
......@@ -62,9 +64,6 @@ grep "version => \"2" "$INTERFACEVIEW" >/dev/null && {
TASTE --load-interface-view "$output_dir"/__interfaceview-v2.aadl --export-interface-view-to-1_3 "$INTERFACEVIEW"
};
md5sum "$INTERFACEVIEW" > InterfaceView.md5
mkdir -p "$output_dir" 2>/dev/null && shift || output_dir=.
echo '[INFO] Collecting ASN.1 files'
taste-extract-asn-from-design.exe -i "$INTERFACEVIEW" -j "$output_dir"/dataview-uniq.asn
......
......@@ -115,7 +115,7 @@ class Poll_taste_probe_console(threading.Thread):
def ProcessTM(self):
'''Parses the incoming Telemetry (Update_monitorings)'''
# For now, there's only one type of monitoring TM
if self.messageReceivedType != PA.i_update_monitorings:
if self.messageReceivedType != PythonController.i_update_monitorings:
return
# Are we recording?
......@@ -142,7 +142,7 @@ class Poll_taste_probe_console(threading.Thread):
# Actual TM handling:
var_monitorings = dataview_uniq_asn.TASTE_Monitoring_list()
DV.SetDataFor_TASTE_Monitoring_list(var_monitorings._ptr, self._pMem)
var_monitorings.SetData(self._pMem)
# for each one of the entries in the list
for i in xrange(0, var_monitorings.GetLength()):
monitoring = var_monitorings[i]
......
Subproject commit c33b6c810e4ef173c41cc3f695ced0e2d8d99b6d
Subproject commit 0280477b8d414f458cb8a9bb47d5a45aea82f1c5
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment