Skip to content
Snippets Groups Projects
Commit 7bba7b00 authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Update on code generator with query

parent 6768a5bf
No related branches found
No related tags found
No related merge requests found
......@@ -214,8 +214,8 @@ void executeSendBroadcastTransaction(request *req) {
void executeQueryFIFOSize(request *req) {
debugMsg("Execute FIFO size query");
int nb = req->asyncChannel->currentNbOfMessages;
req->params[0] = 0;
debugInt("NUMBER of elements in FIFO", nb);
*(req->params[0]) = req->asyncChannel->currentNbOfMessages;
}
......@@ -346,6 +346,14 @@ int executable(setOfRequests *list, int nb) {
req->executable = 1;
cpt ++;
}
if (req->type == QUERY_FIFO_SIZE) {
debugMsg("query fifo");
req->executable = 1;
cpt ++;
}
}
req = req->nextRequestInList;
......@@ -402,6 +410,8 @@ void private__makeRequestPending(setOfRequests *list) {
}
void private__makeRequest(request *req) {
if (req->type == SEND_SYNC_REQUEST) {
executeSendSyncTransaction(req);
}
......
......@@ -60,7 +60,11 @@
<CryptoBlock value="false" />
<Attribute access="0" id="cpt" value="3" type="8" typeOther="" />
<Attribute access="0" id="x" value="" type="8" typeOther="" />
<Method value="$myPrint(int x)" />
<Signal value="in read()" attached="true" />
<globalCode value="void __userImplemented__Reader__myPrint(int x) {" />
<globalCode value=" printf(&quot;x=%d\n&quot;, x);" />
<globalCode value="}" />
</extraparam>
</COMPONENT>
......@@ -257,7 +261,7 @@
</CONNECTOR><SUBCOMPONENT type="-1" id="86" uid="b94f7898-e793-4379-a01e-5325ab4cf244" >
<father id="88" num="0" />
<cdparam x="554" y="333" />
<sizeparam width="71" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<sizeparam width="79" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<enabled value="true" />
<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
......@@ -268,7 +272,7 @@
<TGConnectingPoint num="3" id="85" />
<extraparam>
<guard value="[ ite &gt; 0]" enabled="true"/>
<afterMin value="5" enabled="true"/>
<afterMin value="11" enabled="true"/>
<afterMax value="15" enabled="true"/>
<extraDelay1 value="" enabled="true"/>
<extraDelay2 value="" enabled="true"/>
......@@ -622,8 +626,8 @@
<AutomaticDrawing data="true" />
</CONNECTOR><SUBCOMPONENT type="-1" id="225" uid="59816637-e917-4dd7-9c40-44aed2b1868d" >
<father id="227" num="0" />
<cdparam x="528" y="296" />
<sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<cdparam x="581" y="296" />
<sizeparam width="58" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
<hidden value="false" />
<enabled value="true" />
<cdrectangleparam minX="10" maxX="2500" minY="10" maxY="1500" />
......@@ -642,6 +646,7 @@
<computeMin value="" enabled="true"/>
<computeMax value="" enabled="true"/>
<probability value="" enabled="true"/>
<actions value="myPrint(x)" enabled="true"/>
</extraparam>
</SUBCOMPONENT>
......
......@@ -675,6 +675,9 @@ public class AVATAR2CPOSIX {
", QUERY_FIFO_SIZE, " + 0 + ", 0, 0, " + "1"
+ ", __params0__" + _block.getName() + ");" + CR;
ret += "__req0" + "__" + _block.getName() + ".asyncChannel = &__" + getChannelName(ar, as) + ";" + CR;
ret += "addRequestToList(&__list__" + _block.getName() + ", &__req0__" + _block.getName() +");" + CR;
ret += executeOneRequest(_block, "__req0__" + _block.getName());
ret += traceRequest(_block);
//ret += "makeNewRequest(&__req" + _index + "__" + _block.getName() + ", " + _aaos.getID() + ", SEND_SYNC_REQUEST, " +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment