Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2015 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | header: |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 18 | summary: Input/Output Functions |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 19 | description: |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 20 | These functions are used to:<ul> |
| 21 | <li>Send information to the Java client, and</li> |
| 22 | #TODO We need better documentation for: |
| 23 | <li>Send the processed allocation or receive the next allocation to process.</li></ul> |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 24 | end: |
| 25 | |
| 26 | function: rsAllocationIoReceive |
| 27 | version: 16 |
| 28 | ret: void |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 29 | arg: rs_allocation a, "Allocation to work on." |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 30 | summary: Receive new content from the queue |
| 31 | description: |
| 32 | Receive a new set of contents from the queue. |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 33 | #TODO We need better documentation. |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 34 | test: none |
| 35 | end: |
| 36 | |
| 37 | function: rsAllocationIoSend |
| 38 | version: 16 |
| 39 | ret: void |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 40 | arg: rs_allocation a, "Allocation to work on." |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 41 | summary: Send new content to the queue |
| 42 | description: |
| 43 | Send the contents of the Allocation to the queue. |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 44 | #TODO We need better documentation. |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 45 | test: none |
| 46 | end: |
| 47 | |
| 48 | function: rsSendToClient |
| 49 | ret: bool |
| 50 | arg: int cmdID |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 51 | summary: Send a message to the client, non-blocking |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 52 | description: |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 53 | Sends a message back to the client. This call does not block. |
| 54 | It returns true if the message was sent and false if the |
| 55 | message queue is full. |
| 56 | |
| 57 | A message ID is required. The data payload is optional. |
| 58 | |
| 59 | See <a href='http://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html'>RenderScript.RSMessageHandler</a>. |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 60 | test: none |
| 61 | end: |
| 62 | |
| 63 | function: rsSendToClient |
| 64 | ret: bool |
| 65 | arg: int cmdID |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 66 | arg: const void* data, "Application specific data." |
| 67 | arg: uint len, "Length of the data, in bytes." |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 68 | test: none |
| 69 | end: |
| 70 | |
| 71 | function: rsSendToClientBlocking |
| 72 | ret: void |
| 73 | arg: int cmdID |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 74 | summary: Send a message to the client, blocking |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 75 | description: |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 76 | Sends a message back to the client. This function will block |
| 77 | until there is room on the message queue for this message. |
| 78 | This function may return before the message was delivered and |
| 79 | processed by the client. |
| 80 | |
| 81 | A message ID is required. The data payload is optional. |
| 82 | |
| 83 | See <a href='http://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html'>RenderScript.RSMessageHandler</a>. |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 84 | test: none |
| 85 | end: |
| 86 | |
| 87 | function: rsSendToClientBlocking |
| 88 | ret: void |
| 89 | arg: int cmdID |
Jean-Luc Brouillet | 20b27d6 | 2015-04-03 14:39:53 -0700 | [diff] [blame] | 90 | arg: const void* data, "Application specific data." |
| 91 | arg: uint len, "Length of the data, in bytes." |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 92 | test: none |
| 93 | end: |