Martijn Coenen | cbe590c | 2016-08-30 11:27:56 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 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 | |
Hridya Valsaraju | 3e32003 | 2016-08-08 11:12:30 -0700 | [diff] [blame] | 17 | package android.hardware.tests.msgq@1.0; |
| 18 | |
| 19 | interface ITestMsgQ { |
Hridya Valsaraju | 9d9672c | 2016-09-21 17:47:06 -0700 | [diff] [blame] | 20 | /* |
| 21 | * This method requests the service to set up Synchronous read/write |
| 22 | * wait-free FMQ with the client as reader. |
Hridya Valsaraju | 954515f | 2016-09-27 13:43:57 -0700 | [diff] [blame] | 23 | * @return ret Will be true if the setup is successful, false otherwise. |
Hridya Valsaraju | 9d9672c | 2016-09-21 17:47:06 -0700 | [diff] [blame] | 24 | * @return mqDesc This structure describes the FMQ that was |
| 25 | * set up by the service. Client can use it to set up the FMQ at its end. |
| 26 | */ |
| 27 | configureFmqSyncReadWrite() |
Hridya Valsaraju | 954515f | 2016-09-27 13:43:57 -0700 | [diff] [blame] | 28 | generates(bool ret, MQDescriptorSync mqDesc); |
Hridya Valsaraju | 3e32003 | 2016-08-08 11:12:30 -0700 | [diff] [blame] | 29 | |
Hridya Valsaraju | 9d9672c | 2016-09-21 17:47:06 -0700 | [diff] [blame] | 30 | /* |
| 31 | * This method request the service to write into the FMQ. |
| 32 | * @param count Number to messages to write. |
Hridya Valsaraju | 954515f | 2016-09-27 13:43:57 -0700 | [diff] [blame] | 33 | * @return ret Will be true if the write operation was successful, |
| 34 | * false otherwise. |
Hridya Valsaraju | 9d9672c | 2016-09-21 17:47:06 -0700 | [diff] [blame] | 35 | */ |
Hridya Valsaraju | 954515f | 2016-09-27 13:43:57 -0700 | [diff] [blame] | 36 | requestWrite(int32_t count) generates(bool ret); |
Hridya Valsaraju | 3e32003 | 2016-08-08 11:12:30 -0700 | [diff] [blame] | 37 | |
Hridya Valsaraju | 9d9672c | 2016-09-21 17:47:06 -0700 | [diff] [blame] | 38 | /* |
| 39 | * This method request the service to read from the FMQ. |
| 40 | * @param count Number to messages to read. |
Hridya Valsaraju | 954515f | 2016-09-27 13:43:57 -0700 | [diff] [blame] | 41 | * @return ret Will be true if the read operation was successful, false |
| 42 | * otherwise. |
Hridya Valsaraju | 9d9672c | 2016-09-21 17:47:06 -0700 | [diff] [blame] | 43 | */ |
Hridya Valsaraju | 954515f | 2016-09-27 13:43:57 -0700 | [diff] [blame] | 44 | requestRead(int32_t count) generates(bool ret); |
Hridya Valsaraju | 3e32003 | 2016-08-08 11:12:30 -0700 | [diff] [blame] | 45 | }; |