https://taste.tuxfamily.org/wiki/index.php?title=Tasted&feed=atom&action=historyTasted - Revision history2024-03-28T19:26:44ZRevision history for this page on the wikiMediaWiki 1.29.0https://taste.tuxfamily.org/wiki/index.php?title=Tasted&diff=143&oldid=prevTtsiodras: 1 revision imported2017-08-04T21:01:58Z<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr style='vertical-align: top;' lang='en'>
<td colspan='1' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black; text-align: center;">Revision as of 21:01, 4 August 2017</td>
</tr><tr><td colspan='2' style='text-align: center;' lang='en'><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Ttsiodrashttps://taste.tuxfamily.org/wiki/index.php?title=Tasted&diff=142&oldid=prevPbradley: /* Getting ASN.1 AADL dataview */2012-05-30T12:46:59Z<p><span dir="auto"><span class="autocomment">Getting ASN.1 AADL dataview</span></span></p>
<p><b>New page</b></p><div>= Overview =<br />
tasted is a TASTE daemon designed to ease the execution of generated applications. Once system designers have successfully built their systems, they can automatically execute them on boards. As the TASTE toolset can produce applications for systems with different architectures and requirements, it is sometimes difficult to deploy them altogether. The TASTE daemon aims at facilitate this deployment and execution step. The TASTE daemon runs on a machine (potentially the same machine as the host development) and listens for incoming requests.<br />
<br />
<br />
Location on the SVN repository: https://tecsw.estec.esa.int/svn/taste/trunk/tasted<br />
<br />
= Features =<br />
* Execute applications remotely<br />
* Build binaries of a project<br />
* Generate AADL dataview<br />
* Generate skeletons<br />
* Handle the components library<br />
<br />
= License =<br />
Released under [http://opensource.org/licenses/gpl-license.php GPL] license.<br />
<br />
= Dependencies =<br />
* [http://gcc.gnu.org/ GCC]<br />
* [http://xmlsoft.org/ libxml2 development library]<br />
* [http://www.gnu.org/software/make/ GNU Make]<br />
* [http://code.google.com/p/libarchive/ Libarchive]<br />
<br />
= Protocol =<br />
The protocol works more or less as the FTP protocol: you have one connection to exchange control data (XML-based notation) and another to exchange binary data (project archive or data being produce during the execution of a program). It exchanges data on top of the TCP stack (for both the control data and the pure data). The control data are exchanged on a fixed port while data are exchanged on a port allocated for each request. This is explained in the protocol definition and its illustration below.<br />
<br />
<br />
There are two main message types:<br />
# request, sent from the client to tasted<br />
# answer sent from tasted to the client<br />
<br />
Request types are the following:<br />
* generate-skels<br />
* generate-dataview-aadl<br />
* build<br />
* getgmonout<br />
* exec<br />
* exit<br />
<br />
Answer are the following:<br />
* sendbin<br />
* gmonok<br />
* gmonko<br />
* execerror<br />
* generate-skels-result<br />
* generate-dataview-aadl-result<br />
* build-result<br />
* send-archive<br />
<br />
<br />
<br />
== Getting ASN.1 AADL dataview ==<br />
The client first issues a request to send the archive containing the project. Then, tasted replies with a new archive with the updated project.<br />
<br />
:<syntaxhighlight lang="xml"><br />
<request type="generate-dataview-aadl"/><br />
</syntaxhighlight><br />
<br />
Then, the server answers with the following message:<br />
<syntaxhighlight lang="xml"><br />
<answer type="send-archive"><br />
<option name="port" value="PORTVAL"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
Then, the client has to initiate a socket to the server on port PORTVAL.<br />
<br />
Once the project archive is sent, the server generates the AADL Data view and replies using this message:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="generate-dataview-aadl-result" status="ok"><br />
</answer><br />
</syntaxhighlight><br />
<br />
In case there is an error, the following message is then sent:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="generate-dataview-aadl-result" status="ko"><br />
<option name="code" value="ERRCODE"/><br />
<option name="message" value="ERRMSG"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
In that case, code and message are optional.<br />
<br />
In case the project archive could not be sent, the following message is sent:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="send_error"><br />
<option name="code" value="ERRCODE"/><br />
<option name="message" value="ERRMSG"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
In that case, code and message are optional.<br />
<br />
=== Example ===<br />
This is an example of the messages being exchanged between the client and the server:<br />
<syntaxhighlight lang="xml"><br />
<request type="generate-dataview-aadl"/><br />
<answer type="send-archive"><option name="port" value="5680"/></answer><br />
</syntaxhighlight><br />
In the meantime, the client sends the project through a socket in port 5680 and receives on the same socket the updated project if successful.<br />
:<syntaxhighlight lang="xml"><br />
<answer type="generate-dataview-aadl-result" status="ok"/><br />
</syntaxhighlight><br />
<br />
This protocol is illustrated in the following picture : <br />
[[File:Tasted-dataview-protocol.png|300px|thumb|right|Protocol for the Generation of the AADL dataview]]<br />
<br />
== Generating skeletons ==<br />
The client first issues a request to send the archive containing the project. Then, tasted replies with a new archive containing the code skeletons.<br />
<br />
<syntaxhighlight lang="xml"><br />
<request type="generate-skels"/><br />
</syntaxhighlight><br />
<br />
Then, the server answers with the following message:<br />
<syntaxhighlight lang="xml"><br />
<answer type="send-archive"><br />
<option name="port" value="PORTVAL"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
Then, the client has to initiate a socket to the server on port PORTVAL.<br />
<br />
Once the project archive is sent, the server generates the skeletons, populates the archive with them and replies using this message:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="generate-skels-result" status="ok"><br />
</answer><br />
</syntaxhighlight><br />
<br />
In case there is an error, the following message is sent:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="generate-skels-result" status="ko"><br />
<option name="code" value="ERRCODE"/><br />
<option name="message" value="ERRMSG"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
In that case, code and message are optional.<br />
<br />
In case the project archive could not be sent, the following message is sent:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="send_error"><br />
<option name="code" value="ERRCODE"/><br />
<option name="message" value="ERRMSG"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
In that case, code and message are optional.<br />
<br />
== Building binaries ==<br />
The client first issues a request to send the archive containing the project. Then, tasted replies with a new archive containing the binaries.<br />
<br />
<syntaxhighlight lang="xml"><br />
<request type="build"/><br />
</syntaxhighlight><br />
<br />
Then, the server answers with the following message:<br />
<syntaxhighlight lang="xml"><br />
<answer type="send-archive"><br />
<option name="port" value="PORTVAL"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
Then, the client has to initiate a socket to the server on port PORTVAL.<br />
<br />
Once the project archive is sent, the server generates the binaries, populates the archive with them and replies using this message:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="build-result" status="ok"><br />
</answer><br />
</syntaxhighlight><br />
<br />
In case there is an error, the following message is sent:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="build-result" status="ko"><br />
<option name="code" value="ERRCODE"/><br />
<option name="message" value="ERRMSG"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
In that case, code and message are optional.<br />
<br />
In case the project archive could not be sent, the following message is sent:<br />
<br />
<syntaxhighlight lang="xml"><br />
<answer type="send_error"><br />
<option name="code" value="ERRCODE"/><br />
<option name="message" value="ERRMSG"/><br />
</answer><br />
</syntaxhighlight><br />
<br />
In that case, code and message are optional.<br />
<br />
== Execute Binaries ==<br />
This protocol is illustrated in the following picture : <br />
[[File:Tasted-exec-protocol.png|300px|thumb|right|Protocol for the execution of binaries]]<br />
<br />
<br />
== Testing tasted ==<br />
You can test tasted using netcat. The idea is the following:<br />
# You start tasted on the command line<br />
# You connect on the server using netcat using a first TCP connection (connection 1)<br />
# You send the archive if required using netcat using a second connection (connection 2)<br />
<br />
The result would be the XML input/output on connection 1 and projects files on connection 2.<br />
<br />
There is an example of a session of debugging to get the AADL dataview for a project.<br />
<br />
# On one shell session, start tasted, like this: <syntaxhighlight lang="bash"> ./tasted </syntaxhighlight><br />
# On another session, connect to the server (we assume the server is running on port 5678) <syntaxhighlight lang="bash">telnet localhost 5678</syntaxhighlight> and type the following command: <syntaxhighlight lang="xml"><request type="generate-dataview-aadl"/></syntaxhighlight>. Then, the server answer something like: <syntaxhighlight lang="xml"><answer type="send-archive"><option name="port" value="5680"/></answer></syntaxhighlight>.<br />
# Send the binary on the port specified by the server (here 5680, see previous answer from the server): <syntaxhighlight lang="bash">cat project.taste|nc localhost 5680</syntaxhighlight>. Then, you should receive the updated project by the network (the standard output of netcat) amd the terminal executing telnet should receive an XML answer like: <syntaxhighlight lang="xml"><answer type="generate-dataview-aadl-result" status="ok"/></syntaxhighlight>. Also, you can send the archive and store the new archive using the following command-line: <syntaxhighlight lang="bash">cat project.taste|nc localhost 5680 > newarchive</syntaxhighlight>. This would store the updated archive in the file ''newarchive''.<br />
<br />
= Installation from sources =<br />
* Download the sources either with subversion ([[Subversion repository]]) or download through the public repository (http://download.tuxfamily.org/taste)<br />
* Define installation directory<br />
:<syntaxhighlight lang="bash"><br />
assert@assertvm:~/tool-src/tasted$ PREFIX=whereveryouwanttoinstall<br />
</syntaxhighlight><br />
* Install<br />
:<syntaxhighlight lang="bash"><br />
assert@assertvm:~/tool-src/tasted$ make && make install<br />
</syntaxhighlight></div>Pbradley