Added DSL explanation
[des2015.git] / marsrover / document / robot.tex
index f6d0323..7257135 100644 (file)
@@ -178,6 +178,16 @@ mapping is described in \autoref{tab:mapping}.
 \end{table}
 
 \subsection{Domain Specific Language}
+A domain-specific language (DSL)  is  a  programming language or executable specification language that  offers,  through appropriate notations  and  abstractions,  expressive power focused on,  and usually restricted to, a particular problem domain~\cite{van2002domain}. The DSL is designed so that the MarsRover is able to have multiple behaviours and missions. In addition, each of the missions shall have multiple behaviours related to it, it means one registered behaviour can be used in multiple missions. 
 
+We implemented the StoppingExpression in the DSL so that every mission have a condition to stop. Once the condition is reached then the mission is accomplished. The behaviour may also have a StoppingExpression in its TakeAction function from Subsumption architecture. The example of the use StoppingExpression in a bahaviour is one behaviour to avoid left object can be activated if the condition (StoppingExpression) of the left touch sensor is pressed. Furthermore, the StoppingCondition can be whether the color which MarsRover are collected, the touch sensor is touched, the light sensor is activated, the distance of the MarsRover with a certain object is calculated, or if it finds one specific color.
+
+The use of the motors are defined in Action in the DSL. The combination of the motors can be used to represent a certain action, for example below code is used for the action to turn left.
+
+\begin{lstlisting}
+right motor forward
+left motor backward
+wait 250 ms
+\end{lstlisting}
 
 \subsection{Code Structure}