From d1ab82e58abc12e9aad8a7920545314904ccc964 Mon Sep 17 00:00:00 2001 From: jerray <jawher.jerray@eurecom.fr> Date: Wed, 15 Nov 2023 16:25:56 +0100 Subject: [PATCH] add comments in script files that test pattern handling --- .../tmr/cli/apply-tmr-in-modelWithOneSensor | 8 +-- .../cli/apply-tmr-in-modelWithThreeSensors | 8 +-- .../configurate-tmr-for-modelWithOneSensor | 58 +++++++++---------- .../configurate-tmr-for-modelWithThreeSensors | 31 +++++----- .../testPatternHandling/tmr/cli/create-tmr | 18 +++--- ...e-configuration-tmr-for-modelWithOneSensor | 26 +++++++++ 6 files changed, 87 insertions(+), 62 deletions(-) create mode 100644 ttool/src/test/resources/cli/testPatternHandling/tmr/cli/incomplete-configuration-tmr-for-modelWithOneSensor diff --git a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/apply-tmr-in-modelWithOneSensor b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/apply-tmr-in-modelWithOneSensor index 0cb6a393e4..1f6e8e57e8 100644 --- a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/apply-tmr-in-modelWithOneSensor +++ b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/apply-tmr-in-modelWithOneSensor @@ -1,4 +1,4 @@ -pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithOneSensor.tmap -pa a -p resources/test/cli/testPatternHandling/tmr/ -pa a -pc resources/test/cli/testPatternHandling/tmr/modelWithOneSensor-config.json -pa a -g resources/test/cli/testPatternHandling/tmr/modelsAfterIntegratingTMR/ modelWithOneSensorIntegTMR +pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithOneSensor.tmap # Path of the model in which we will integrate the pattern. +pa a -p resources/test/cli/testPatternHandling/tmr/ # Path of the pattern that we want to integrate. +pa a -pc resources/test/cli/testPatternHandling/tmr/modelWithOneSensor-config.json # Path of the configuration json file. +pa a -g resources/test/cli/testPatternHandling/tmr/modelsAfterIntegratingTMR/ modelWithOneSensorIntegTMR # Generate TMAP file of the model after intergrating the pattern. The generated file will be located in the given path and will have "modelWithOneSensorIntegTMR" as name. diff --git a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/apply-tmr-in-modelWithThreeSensors b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/apply-tmr-in-modelWithThreeSensors index 5af221b880..f35a8cea83 100644 --- a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/apply-tmr-in-modelWithThreeSensors +++ b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/apply-tmr-in-modelWithThreeSensors @@ -1,4 +1,4 @@ -pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithThreeSensors.tmap -pa a -p resources/test/cli/testPatternHandling/tmr/ -pa a -pc resources/test/cli/testPatternHandling/tmr/modelWithThreeSensors-config.json -pa a -g resources/test/cli/testPatternHandling/tmr/modelsAfterIntegratingTMR/ modelWithThreeSensorsIntegTMR +pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithThreeSensors.tmap # Path of the model in which we will integrate the pattern. +pa a -p resources/test/cli/testPatternHandling/tmr/ # Path of the pattern that we want to integrate. +pa a -pc resources/test/cli/testPatternHandling/tmr/modelWithThreeSensors-config.json # Path of the configuration json file. +pa a -g resources/test/cli/testPatternHandling/tmr/modelsAfterIntegratingTMR/ modelWithThreeSensorsIntegTMR # Generate TMAP file of the model after intergrating the pattern. The generated file will be located in the given path and will have "modelWithThreeSensorsIntegTMR" as name. diff --git a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/configurate-tmr-for-modelWithOneSensor b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/configurate-tmr-for-modelWithOneSensor index 3f0a43c535..4a8a711946 100644 --- a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/configurate-tmr-for-modelWithOneSensor +++ b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/configurate-tmr-for-modelWithOneSensor @@ -1,29 +1,29 @@ -pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithOneSensor.tmap -pa sc -p resources/test/cli/testPatternHandling/tmr/ -pa sc -sp -pa sc -ct SensorClone Sensor -pa sc -ct SensorClone2 Sensor -pa sc -ctl -pa sc -ctr SensorClone -pa sc -ct SensorClone1 Sensor -pa sc -plnc -pa sc -pl InterpreterC.dataC -pa sc -co InterpreterA.dataA Sensor.sensorData -pa sc -co InterpreterB.dataB SensorClone1.sensorData -pa sc -co InterpreterC.dataC SensorClone2.sensorData -pa sc -co Voter.resultData Receiver.sensorData -pa sc -cor InterpreterA.dataA -pa sc -co InterpreterA.dataA Sensor.sensorData -pa sc -co Voter.moveto_FAIL_SAFE Receiver.sensorData NEW -pa sc -col -pa sc -cptl -pa sc -cpd ALL -pa sc -tctl -pa sc -tcn SensorClone1 BusEnvironment -pa sc -tcm SensorClone2 SensorClone1 -pa sc -tcn Voter MainBus -pa sc -mcn SensorClone1.sensorData BusReceiver -pa sc -mcm InterpreterA.resA SensorClone1.sensorData -pa sc -mctl -pa sc -ua Timer dataReceivingTimeout 1000 -pa sc -m resources/test/cli/testPatternHandling/tmr/modelWithOneSensor-config.json +pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithOneSensor.tmap # Path of the model in which we will integrate the pattern. +pa sc -p resources/test/cli/testPatternHandling/tmr/ # Path of the pattern that we want to integrate. +pa sc -sp # Get the name of the selected pattern. +pa sc -ct SensorClone Sensor # Create a task clone named SensorClone from the task Sensor. +pa sc -ct SensorClone2 Sensor # Create a task clone named SensorClone2 from the task Sensor. +pa sc -ctl # Get list of cloned tasks. +pa sc -ctr SensorClone # Remove the cloned task SensorClone. +pa sc -ct SensorClone1 Sensor # Create a task clone named SensorClone1 from the task Sensor. +pa sc -plnc # Get the list of pattern's ports that should be connected. +pa sc -pl InterpreterC.dataC # Get the list of available ports in model that could be used to connect with InterpreterC.dataC. +pa sc -co InterpreterA.dataA Sensor.sensorData # Connect InterpreterA.dataA (pattern side) with Sensor.sensorData (model side). +pa sc -co InterpreterB.dataB SensorClone1.sensorData # Connect InterpreterB.dataB (pattern side) with SensorClone1.sensorData (model side). +pa sc -co InterpreterC.dataC SensorClone2.sensorData # Connect InterpreterC.dataC (pattern side) with SensorClone2.sensorData (model side). +pa sc -co Voter.resultData Receiver.sensorData # Connect Voter.resultData (pattern side) with Receiver.sensorData (model side). +pa sc -cor InterpreterA.dataA # Remove the connection of InterpreterA.dataA. +pa sc -co InterpreterA.dataA Sensor.sensorData # Connect InterpreterA.dataA (pattern side) with Sensor.sensorData (model side). +pa sc -co Voter.moveto_FAIL_SAFE Receiver.sensorData NEW # Connect Voter.moveto_FAIL_SAFE (pattern side) with a New port. +pa sc -col # get the list of connections already made. +pa sc -cptl # get list of ports to be configured. +pa sc -cpd ALL # Choose to remove all the ports as decision. +pa sc -tctl # Get list of tasks to be mapped. +pa sc -tcn SensorClone1 BusEnvironment # Map task SensorClone1 in a new CPU that will be linked to the bus BusEnvironment. +pa sc -tcm SensorClone2 SensorClone1 # Map task SensorClone2 in the same CPU as SensorClone1. +pa sc -tcn Voter MainBus # Map task Voter in a new CPU that will be linked to the bus MainBus. +pa sc -mcn SensorClone1.sensorData BusReceiver # Map channel SensorClone1.sensorData in a new Memory that will be linked to the bus BusReceiver. +pa sc -mcm InterpreterA.resA SensorClone1.sensorData # Map channel InterpreterA.resA in the same Memory as SensorClone1.sensorData. +pa sc -mctl # Get list of channels to be mapped. +pa sc -ua Timer dataReceivingTimeout 1000 # Change the value of the attribut dataReceivingTimeout to 1000. +pa sc -m resources/test/cli/testPatternHandling/tmr/modelWithOneSensor-config.json # Create the configuration json file by giving a name and a path for this json file. diff --git a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/configurate-tmr-for-modelWithThreeSensors b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/configurate-tmr-for-modelWithThreeSensors index dec9cdaa64..525b45a04a 100644 --- a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/configurate-tmr-for-modelWithThreeSensors +++ b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/configurate-tmr-for-modelWithThreeSensors @@ -1,16 +1,15 @@ -pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithThreeSensors.tmap -pa sc -p resources/test/cli/testPatternHandling/tmr/ -pa sc -sp -pa sc -ctl -pa sc -plnc -pa sc -pl InterpreterC.dataC -pa sc -co InterpreterA.dataA Sensor1.sensorData1 -pa sc -co InterpreterB.dataB Sensor2.sensorData2 -pa sc -co InterpreterC.dataC Sensor3.sensorData3 -pa sc -co Voter.resultData Receiver.sensorData1 -pa sc -co Voter.moveto_FAIL_SAFE Receiver.sensorData1 NEW -pa sc -cpd ALL -pa sc -tcn InterpreterB MainBus -pa sc -tcm InterpreterA InterpreterB -pa sc -ua Timer dataReceivingTimeout 500 -pa sc -m resources/test/cli/testPatternHandling/tmr/modelWithThreeSensors-config.json +pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithThreeSensors.tmap # Path of the model in which we will integrate the pattern. +pa sc -p resources/test/cli/testPatternHandling/tmr/ # Path of the pattern that we want to integrate. +pa sc -sp # Get the name of the selected pattern. +pa sc -plnc # Get the list of pattern's ports that should be connected. +pa sc -pl InterpreterC.dataC # Get the list of available ports in model that could be used to connect with InterpreterC.dataC. +pa sc -co InterpreterA.dataA Sensor1.sensorData1 # Connect InterpreterA.dataA (pattern side) with Sensor1.sensorData1 (model side). +pa sc -co InterpreterB.dataB Sensor2.sensorData2 # Connect InterpreterB.dataB (pattern side) with Sensor2.sensorData2 (model side). +pa sc -co InterpreterC.dataC Sensor3.sensorData3 # Connect InterpreterC.dataC (pattern side) with Sensor3.sensorData3 (model side). +pa sc -co Voter.resultData Receiver.sensorData1 # Connect Voter.resultData (pattern side) with Sensor.sensorData (model side). +pa sc -co Voter.moveto_FAIL_SAFE Receiver.sensorData1 NEW # Connect Voter.moveto_FAIL_SAFE (pattern side) with a New port. +pa sc -cpd ALL # Choose to remove all the ports as decision. +pa sc -tcn InterpreterB MainBus # Map task InterpreterB in a new CPU that will be linked to the bus MainBus. +pa sc -tcm InterpreterA InterpreterB # Map task InterpreterA in the same CPU as InterpreterB. +pa sc -ua Timer dataReceivingTimeout 500 # Change the value of the attribut dataReceivingTimeout to 500. +pa sc -m resources/test/cli/testPatternHandling/tmr/modelWithThreeSensors-config.json # Create the configuration json file by giving a name and a path for this json file. diff --git a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/create-tmr b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/create-tmr index 2e16045700..6d4519b91b 100644 --- a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/create-tmr +++ b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/create-tmr @@ -1,9 +1,9 @@ -pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/tmrPattern.tmap -pa c -n tmr -pa c -p resources/test/cli/testPatternHandling/ -pa c -t -pa c -a Voter Timer InterpreterA InterpreterB -pa c -r Timer -pa c -a InterpreterC Timer -pa c -l -pa c -m \ No newline at end of file +pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/tmrPattern.tmap # Path of the model from which we will create a pattern. +pa c -n tmr # Give a name to the pattern to create. +pa c -p resources/test/cli/testPatternHandling/ # Path where patthern files will be created. +pa c -t # Show the tasks names of the model "tmrPattern". +pa c -a Voter Timer InterpreterA InterpreterB # Select the tasks that will make up the pattern. +pa c -r Timer # Remove the task Timer from the list of tasks that will make up the pattern. +pa c -a InterpreterC Timer # Add new elements in the previous list of tasks. +pa c -l # Get the current tasks that will constitue the pattern. +pa c -m # Make the pattern. diff --git a/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/incomplete-configuration-tmr-for-modelWithOneSensor b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/incomplete-configuration-tmr-for-modelWithOneSensor new file mode 100644 index 0000000000..ca4792847b --- /dev/null +++ b/ttool/src/test/resources/cli/testPatternHandling/tmr/cli/incomplete-configuration-tmr-for-modelWithOneSensor @@ -0,0 +1,26 @@ +pa dltmap ../src/test/resources/cli/testPatternHandling/tmr/input/modelsToIntegrateTMR/modelWithOneSensor.tmap # Path of the model in which we will integrate the pattern. +pa sc -p resources/test/cli/testPatternHandling/tmr/ # Path of the pattern that we want to integrate. +pa sc -sp # Get the name of the selected pattern. +pa sc -ct SensorClone Sensor # Create a task clone named SensorClone from the task Sensor. +pa sc -ct SensorClone2 Sensor # Create a task clone named SensorClone2 from the task Sensor. +pa sc -ctl # Get list of cloned tasks. +pa sc -ctr SensorClone # Remove the cloned task SensorClone. +pa sc -ct SensorClone1 Sensor # Create a task clone named SensorClone1 from the task Sensor. +pa sc -plnc # Get the list of pattern's ports that should be connected. +pa sc -pl InterpreterC.dataC # Get the list of available ports in model that could be used to connect with InterpreterC.dataC. +pa sc -co InterpreterA.dataA Sensor.sensorData # Connect InterpreterA.dataA (pattern side) with Sensor.sensorData (model side). +pa sc -co InterpreterB.dataB SensorClone1.sensorData # Connect InterpreterB.dataB (pattern side) with SensorClone1.sensorData (model side). +pa sc -co InterpreterC.dataC SensorClone2.sensorData # Connect InterpreterC.dataC (pattern side) with SensorClone2.sensorData (model side). +pa sc -co Voter.resultData Receiver.sensorData # Connect Voter.resultData (pattern side) with Receiver.sensorData (model side). +pa sc -col # get the list of connections already made. +pa sc -cptl # get list of ports to be configured. +pa sc -cpd ALL # Choose to remove all the ports as decision. +pa sc -tctl # Get list of tasks to be mapped. +pa sc -tcn SensorClone1 BusEnvironment # Map task SensorClone1 in a new CPU that will be linked to the bus BusEnvironment. +pa sc -tcm SensorClone2 SensorClone1 # Map task SensorClone2 in the same CPU as SensorClone1. +pa sc -tcn Voter MainBus # Map task Voter in a new CPU that will be linked to the bus MainBus. +pa sc -mcn SensorClone1.sensorData BusReceiver # Map channel SensorClone1.sensorData in a new Memory that will be linked to the bus BusReceiver. +pa sc -mcm InterpreterA.resA SensorClone1.sensorData # Map channel InterpreterA.resA in the same Memory as SensorClone1.sensorData. +pa sc -mctl # Get list of channels to be mapped. +pa sc -ua Timer dataReceivingTimeout 1000 # Change the value of the attribut dataReceivingTimeout to 1000. +pa sc -m resources/test/cli/testPatternHandling/tmr/modelWithOneSensor-incomplete-config.json # Create the configuration json file by giving a name and a path for this json file. -- GitLab