diff options
author | msmit <msmit@remedy.nl> | 2010-06-17 12:31:42 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2010-06-17 12:31:42 +0000 |
commit | 4bd55d8ffcb9c3e6401b8f10353aa24b1ec401ce (patch) | |
tree | 07c5037bf1773008970a7c9b661f7493b7331aed | |
parent | b3f2d1eb5b8e3136a2bb8c822c3ab1b5013cd803 (diff) | |
download | ATCD-4bd55d8ffcb9c3e6401b8f10353aa24b1ec401ce.tar.gz |
Thu Jun 17 12:28:43 UTC 2010 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tutorials/Shapes/Tutorial/general.html:
* connectors/dds4ccm/tutorials/Shapes/Tutorial/idl.html:
Update.
-rw-r--r-- | CIAO/ChangeLog | 6 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/general.html | 19 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/idl.html | 118 |
3 files changed, 89 insertions, 54 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 722e2e566ca..e99ce283a5f 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,9 @@ +Thu Jun 17 12:28:43 UTC 2010 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/tutorials/Shapes/Tutorial/general.html: + * connectors/dds4ccm/tutorials/Shapes/Tutorial/idl.html: + Update. + Thu Jun 17 11:43:57 UTC 2010 Marcel Smit <msmit@remedy.nl> * connectors/dds4ccm/tutorials/Shapes/Tutorial/idl.html: diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/general.html b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/general.html index 8aa60136241..90f86e4a4a7 100644 --- a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/general.html +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/general.html @@ -12,6 +12,10 @@ combination with a CCM component.<br/> </p> + <p> + TODO: <b><i>short explanation of the DDS4CCM connector.</i></b> + </p> + <h2>System</h2> <p> The system consists of three components: @@ -20,8 +24,19 @@ <li>A receiver component</li> <li>A controller component</li> </ul> - Both the sender and receiver using a DDS4CCM connector. The controller runs a - timer and periodically sends updates regarding location and size to the sender. + In this tutorial RTI DDS is used to transfer data from the sender to the receiver. + Therefor both the sender and receiver are using a DDS4CCM connector.<br/> + The data consists of a struct with the following members: + <ul> + <li>color : represents the color of the shape.</li> + <li>x : represents the location on the x-axis.</li> + <li>y : represents the location on the y-axis</li> + <li>shapesize : represents the size of the shape.</li> + </ul> + The controller controls the location and size of the registered shape.<br/> + The only thing the sender does is registering a shape with DDS and transferring + the data received from the controller to DDS.<br/> + The receiver listens to DDS and receives the updates regarding the shapes data. </p> <img width="60%" height="40%" src="./images/system.png" /> <p><i><b>to-be-replaced</b></i></p> diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/idl.html b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/idl.html index 1d426ce47c2..b6e24b069c7 100644 --- a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/idl.html +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/idl.html @@ -20,33 +20,33 @@ The following IDL files can be found in Shapes_asm/ports: <ul> <li><a href="../Shapes_asm/ports/Shapes_defn.idl">Shapes_defn.idl<a><br/> - <code>module Shapes<br/> - {<br/> - enum ReturnStatus<br/> - {<br/> - RETURN_OK,<br/> - RETURN_ERROR<br/> - };<br/>}; + <code><b>module</b> Shapes<br/> + {<br/> + <b>enum</b> ReturnStatus<br/> + {<br/> + RETURN_OK,<br/> + RETURN_ERROR<br/> + };<br/>}; </code> </li> <li><a href="../Shapes_asm/ports/Shapes_conn.idl">Shapes_conn.idl<a><br/> - <code>module Shapes<br/> - {<br/> - typedef sequence<ShapeType> ShapeTypeSeq;<br/> - module ::CCM_DDS::Typed < ::ShapeType, ShapeTypeSeq> - ShapesConnector;<br/> - };<br/> + <code><b>module</b> Shapes<br/> + {<br/> + <b>typedef</b> <b>sequence</b><ShapeType> ShapeTypeSeq;<br/> + <b>module</b> ::CCM_DDS::Typed < ::ShapeType, ShapeTypeSeq> + ShapesConnector;<br/> + };<br/> </code> This IDL contains the declaration of the DDS4CCM connector. The used module is typed. </li> <li><a href="../Shapes_asm/ports/Shapes_msg.idl">Shapes_msg.idl<a><br/> - <code>struct ShapeType {<br/> - string color; //@key<br/> - long x;<br/> - long y;<br/> - long shapesize;<br/> - };<br/> + <code><b>struct</b> ShapeType {<br/> + <font color="red">string</font> color; <font color="grey">//@key</font><br/> + <font color="red">long</font> x;<br/> + <font color="red">long</font> y;<br/> + <font color="red">long</font> shapesize;<br/> + };<br/> </code> The ShapeType struct is the the data structure that is send from the sender to the receiver through DDS.<br/> @@ -66,40 +66,40 @@ The interface declaration is in <a href="../Shapes_asm/Shapes_Control_comp/ports/Shapes_Control_obj.idl"> Shapes_asm/Shapes_Control_comp/ports/Shapes_Control_obj.idl<a><br/> - The IDL looks like this:<br/> + The IDL looks like this: </p> <p> - <code>module Shapes<br/> - {<br/> - interface Control_obj<br/> - {<br/> - ReturnStatus setSize (in unsigned short size);<br/> - ReturnStatus setLocation (in unsigned short x,<br/> - in unsigned short y);<br/> - };<br/> - };<br/> - </code> + <br/><code><b>module</b> Shapes<br/> + {<br/> + <b>interface</b> Control_obj<br/> + {<br/> + ReturnStatus setSize (<b>in unsigned</b> <font color="red">short</font> size);<br/> + ReturnStatus setLocation (<b>in unsigned</b> <font color="red">short</font> x,<br/> + <b>in unsigned</b> <font color="red">short</font> y);<br/> + };<br/> + };<br/> + </code><br/> The controller component periodically calls the setSize and setLocation methods on the sender component. </p> <p> - The component IDL file itself is located in + The component IDL file itself is located in <a href="../Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp.idl"> Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp.idl<a><br/> and looks like this: </p> <p> - <code>module Shapes<br/> - {<br/> - component Control_comp<br/> - {<br/> - uses Shapes::Control_obj control;<br/><br/> - attribute unsigned long rate;<br/> - attribute unsigned short max_x;<br/> - attribute unsigned short max_y;<br/> - attribute unsigned short max_size;<br/> - attribute boolean resize_shape;<br/> - };<br/>};<br/> + <br/><code><b>module</b> Shapes<br/> + {<br/> + <b>component</b> Control_comp<br/> + {<br/> + <b>uses</b> Shapes::Control_obj control;<br/><br/> + <b>attribute unsigned</b> <font color="red">long</font> rate;<br/> + <b>attribute unsigned</b> <font color="red">short</font> max_x;<br/> + <b>attribute unsigned</b> <font color="red">short</font> max_y;<br/> + <b>attribute unsigned</b> <font color="red">short</font> max_size;<br/> + <b>attribute</b><font color="red">boolean</font> resize_shape;<br/> + };<br/>};<br/> </code> </p> <p> @@ -125,20 +125,34 @@ </ul> The attributes are set by the deployment plan and cannot be changed throughout the lifecycle of the controller component. + </p> <h2>Sender IDL file</h2> - The component IDL file itself is located in + <p> + The moment the controller invokes setSize or setLocation, the sender translates + the received size and location into the ShapeType struct. After that, it'll + present the updated struct to DDS, by calling write_one on the DDS_Write port. + The IDL file of the Sender component looks like this:<br/> + <br/><code><b>module</b> Shapes<br/> + {<br/> + <b>component</b> Sender_comp<br/> + {<br/> + <b>port</b> ShapesConnector::DDS_Write info_write;<br/> + <b>provides</b> Shapes::Control_obj control;<br/> + };<br/>}; + </code><br/><br/> + The IDL file is located in <a href="../Shapes_asm/Shapes_Sender_comp/src/Shapes_Sender_comp.idl"> Shapes_asm/Shapes_Sender_comp/src/Shapes_Sender_comp.idl<a><br/> - and looks like this: + </p> <p> - <code>module Shapes<br/> - {<br/> - component Sender_comp<br/> - {<br/> - port ShapesConnector::DDS_Write info_write;<br/> - provides Shapes::Control_obj control;<br/> - };<br/>}; - </code> + The Sender uses the DDS_Write port of the DDS4CCM connector. This means that + the Sender is able to write data to DDS.<br/> + The Sender provides the Control_obj interface to the Controller component. This + means that the sender component implements the Control_obj interface so that the + controller is able to invoke the provided methods. </p> + + <h2>Receiver IDL file</h2> + <p> </body>
\ No newline at end of file |