blob: dcdc74a2ceb48852bcdc97fdf5a494a688a04150 [file] [log] [blame]
Martijn Coenencbe590c2016-08-30 11:27:56 -07001/*
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 Valsaraju3e320032016-08-08 11:12:30 -070017package android.hardware.tests.msgq@1.0;
18
19interface ITestMsgQ {
Hridya Valsaraju9d9672c2016-09-21 17:47:06 -070020 /*
Hridya Valsarajub4358452016-10-14 16:48:01 -070021 * This method requests the service to set up a synchronous read/write
Hridya Valsaraju9d9672c2016-09-21 17:47:06 -070022 * wait-free FMQ with the client as reader.
Hridya Valsarajub4358452016-10-14 16:48:01 -070023 *
24 * @return ret True if the setup is successful.
Hridya Valsaraju9d9672c2016-09-21 17:47:06 -070025 * @return mqDesc This structure describes the FMQ that was
26 * set up by the service. Client can use it to set up the FMQ at its end.
27 */
28 configureFmqSyncReadWrite()
Hridya Valsaraju954515f2016-09-27 13:43:57 -070029 generates(bool ret, MQDescriptorSync mqDesc);
Hridya Valsaraju3e320032016-08-08 11:12:30 -070030
Hridya Valsaraju9d9672c2016-09-21 17:47:06 -070031 /*
Hridya Valsarajub4358452016-10-14 16:48:01 -070032 * This method requests the service to set up an unsynchronized write
33 * wait-free FMQ with the client as reader.
34 *
35 * @return ret True if the setup is successful.
36 * @return mqDesc This structure describes the FMQ that was
37 * set up by the service. Client can use it to set up the FMQ at its end.
Hridya Valsaraju9d9672c2016-09-21 17:47:06 -070038 */
Hridya Valsarajub4358452016-10-14 16:48:01 -070039 configureFmqUnsyncWrite()
40 generates(bool ret, MQDescriptorUnsync mqDesc);
Hridya Valsaraju3e320032016-08-08 11:12:30 -070041
Hridya Valsaraju9d9672c2016-09-21 17:47:06 -070042 /*
Hridya Valsarajub4358452016-10-14 16:48:01 -070043 * This method request the service to write into the synchronized read/write
44 * flavor of the FMQ.
45 *
46 * @param count Number to messages to write.
47 *
48 * @return ret True if the write operation was successful.
Hridya Valsaraju9d9672c2016-09-21 17:47:06 -070049 */
Hridya Valsarajub4358452016-10-14 16:48:01 -070050 requestWriteFmqSync(int32_t count) generates(bool ret);
51
52 /*
53 * This method request the service to read from the synchronized read/write
54 * FMQ.
55 *
56 * @param count Number to messages to read.
57 *
58 * @return ret True if the read operation was successful.
59 */
60 requestReadFmqSync(int32_t count) generates(bool ret);
61
62 /*
63 * This method request the service to write into the unsynchronized flavor
64 * of FMQ.
65 *
66 * @param count Number to messages to write.
67 *
68 * @return ret True if the write operation was successful.
69 */
70 requestWriteFmqUnsync(int32_t count) generates(bool ret);
71
72 /*
73 * This method request the service to read from the unsynchronized flavor of
74 * FMQ.
75 *
76 * @param count Number to messages to read.
77 *
78 * @return ret Will be True if the read operation was successful.
79 */
80 requestReadFmqUnsync(int32_t count) generates(bool ret);
81
Hridya Valsaraju3e320032016-08-08 11:12:30 -070082};