Home | History | Annotate | Download | only in reference
      1 page.title=RenderScript Input/Output Functions
      2 
      3 @jd:body
      4 
      5 <div class='renderscript'>
      6 <h2>Overview</h2>
      7 <p> These functions are used to:<ul>
      8 <li>Send information to the Java client, and</li>
      9 <li>Send the processed allocation or receive the next allocation to process.</li></ul>
     10 </p>
     11 <h2>Summary</h2>
     12 <table class='jd-sumtable'><tbody>
     13   <tr><th colspan='2'>Functions</th></tr>
     14   <tr class='alt-color api apilevel-1'>
     15     <td class='jd-linkcol'>
     16       <a href='rs_io.html#android_rs:rsAllocationIoReceive'>rsAllocationIoReceive</a>
     17     </td>
     18     <td class='jd-descrcol' width='100%'>
     19       Receive new content from the queue
     20     </td>
     21   </tr>
     22   <tr class='alt-color api apilevel-1'>
     23     <td class='jd-linkcol'>
     24       <a href='rs_io.html#android_rs:rsAllocationIoSend'>rsAllocationIoSend</a>
     25     </td>
     26     <td class='jd-descrcol' width='100%'>
     27       Send new content to the queue
     28     </td>
     29   </tr>
     30   <tr class='alt-color api apilevel-1'>
     31     <td class='jd-linkcol'>
     32       <a href='rs_io.html#android_rs:rsSendToClient'>rsSendToClient</a>
     33     </td>
     34     <td class='jd-descrcol' width='100%'>
     35       Send a message to the client, non-blocking
     36     </td>
     37   </tr>
     38   <tr class='alt-color api apilevel-1'>
     39     <td class='jd-linkcol'>
     40       <a href='rs_io.html#android_rs:rsSendToClientBlocking'>rsSendToClientBlocking</a>
     41     </td>
     42     <td class='jd-descrcol' width='100%'>
     43       Send a message to the client, blocking
     44     </td>
     45   </tr>
     46 </tbody></table>
     47 <h2>Functions</h2>
     48 <a name='android_rs:rsAllocationIoReceive'></a>
     49 <div class='jd-details'>
     50   <h4 class='jd-details-title'>
     51     <span class='sympad'>rsAllocationIoReceive</span>
     52     <span class='normal'>: Receive new content from the queue</span>
     53   </h4>
     54   <div class='jd-details-descr'>
     55     <table class='jd-tagtable'><tbody>
     56       <tr>
     57         <td>void rsAllocationIoReceive(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> a);
     58 </td>
     59         <td>    Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
     60         </td>
     61       </tr>
     62     </tbody></table>
     63   </div>
     64   <div class='jd-tagdata'>    <h5 class='jd-tagtitle'>Parameters</h5>
     65     <table class='jd-tagtable'><tbody>
     66     <tr><th>a</th><td>Allocation to work on.</td></tr>
     67     </tbody></table>
     68   </div>
     69   <div class='jd-tagdata jd-tagdescr'>
     70 <p> Receive a new set of contents from the queue.
     71 </p>
     72   </div>
     73 </div>
     74 
     75 <a name='android_rs:rsAllocationIoSend'></a>
     76 <div class='jd-details'>
     77   <h4 class='jd-details-title'>
     78     <span class='sympad'>rsAllocationIoSend</span>
     79     <span class='normal'>: Send new content to the queue</span>
     80   </h4>
     81   <div class='jd-details-descr'>
     82     <table class='jd-tagtable'><tbody>
     83       <tr>
     84         <td>void rsAllocationIoSend(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> a);
     85 </td>
     86         <td>    Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
     87         </td>
     88       </tr>
     89     </tbody></table>
     90   </div>
     91   <div class='jd-tagdata'>    <h5 class='jd-tagtitle'>Parameters</h5>
     92     <table class='jd-tagtable'><tbody>
     93     <tr><th>a</th><td>Allocation to work on.</td></tr>
     94     </tbody></table>
     95   </div>
     96   <div class='jd-tagdata jd-tagdescr'>
     97 <p> Send the contents of the Allocation to the queue.
     98 </p>
     99   </div>
    100 </div>
    101 
    102 <a name='android_rs:rsSendToClient'></a>
    103 <div class='jd-details'>
    104   <h4 class='jd-details-title'>
    105     <span class='sympad'>rsSendToClient</span>
    106     <span class='normal'>: Send a message to the client, non-blocking</span>
    107   </h4>
    108   <div class='jd-details-descr'>
    109     <table class='jd-tagtable'><tbody>
    110       <tr>
    111         <td>bool rsSendToClient(int cmdID);
    112 </td>
    113         <td>        </td>
    114       </tr>
    115       <tr>
    116         <td>bool rsSendToClient(int cmdID, const void* data, <a href='rs_value_types.html#android_rs:uint'>uint</a> len);
    117 </td>
    118         <td>        </td>
    119       </tr>
    120     </tbody></table>
    121   </div>
    122   <div class='jd-tagdata'>    <h5 class='jd-tagtitle'>Parameters</h5>
    123     <table class='jd-tagtable'><tbody>
    124     <tr><th>cmdID</th><td></td></tr>
    125     <tr><th>data</th><td>Application specific data.</td></tr>
    126     <tr><th>len</th><td>Length of the data, in bytes.</td></tr>
    127     </tbody></table>
    128   </div>
    129   <div class='jd-tagdata jd-tagdescr'>
    130 <p> Sends a message back to the client.  This call does not block.
    131 It returns true if the message was sent and false if the
    132 message queue is full.
    133 </p>
    134 
    135 <p> A message ID is required.  The data payload is optional.
    136 </p>
    137 
    138 <p> See <a href='http://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html'>RenderScript.RSMessageHandler</a>.
    139 </p>
    140   </div>
    141 </div>
    142 
    143 <a name='android_rs:rsSendToClientBlocking'></a>
    144 <div class='jd-details'>
    145   <h4 class='jd-details-title'>
    146     <span class='sympad'>rsSendToClientBlocking</span>
    147     <span class='normal'>: Send a message to the client, blocking</span>
    148   </h4>
    149   <div class='jd-details-descr'>
    150     <table class='jd-tagtable'><tbody>
    151       <tr>
    152         <td>void rsSendToClientBlocking(int cmdID);
    153 </td>
    154         <td>        </td>
    155       </tr>
    156       <tr>
    157         <td>void rsSendToClientBlocking(int cmdID, const void* data, <a href='rs_value_types.html#android_rs:uint'>uint</a> len);
    158 </td>
    159         <td>        </td>
    160       </tr>
    161     </tbody></table>
    162   </div>
    163   <div class='jd-tagdata'>    <h5 class='jd-tagtitle'>Parameters</h5>
    164     <table class='jd-tagtable'><tbody>
    165     <tr><th>cmdID</th><td></td></tr>
    166     <tr><th>data</th><td>Application specific data.</td></tr>
    167     <tr><th>len</th><td>Length of the data, in bytes.</td></tr>
    168     </tbody></table>
    169   </div>
    170   <div class='jd-tagdata jd-tagdescr'>
    171 <p> Sends a message back to the client.  This function will block
    172 until there is room on the message queue for this message.
    173 This function may return before the message was delivered and
    174 processed by the client.
    175 </p>
    176 
    177 <p> A message ID is required.  The data payload is optional.
    178 </p>
    179 
    180 <p> See <a href='http://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html'>RenderScript.RSMessageHandler</a>.
    181 </p>
    182   </div>
    183 </div>
    184 
    185 </div>
    186