1/* 2 * Copyright (C) 2019 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 17package [email protected]; 18 19import IEvsCamera; 20import IEvsDisplay; 21import IEvsUltrasonicsArray; 22import @1.0::IEvsEnumerator; 23import @1.0::EvsResult; 24import [email protected]::Stream; 25 26/** 27 * Provides the mechanism for EVS camera and ultrasonics array discovery 28 */ 29interface IEvsEnumerator extends @1.0::IEvsEnumerator { 30 /** 31 * Returns a list of all EVS cameras available to the system 32 * 33 * @return cameras A list of cameras availale for EVS service. 34 */ 35 getCameraList_1_1() generates (vec<CameraDesc> cameras); 36 37 /** 38 * Gets the IEvsCamera associated with a cameraId from a CameraDesc 39 * 40 * Given a camera's unique cameraId from CameraDesc, returns the 41 * IEvsCamera interface associated with the specified camera. When 42 * done using the camera, the caller may release it by calling closeCamera(). 43 * 44 * @param cameraId A unique identifier of the camera. 45 * @param streamCfg A stream configuration the client wants to use. 46 * @return evsCamera EvsCamera object associated with a given cameraId. 47 * Returned object would be null if a camera device does 48 * not support a given stream configuration or is already 49 * configured differently by another client. 50 */ 51 openCamera_1_1(string cameraId, Stream streamCfg) generates (IEvsCamera evsCamera); 52 53 /** 54 * Tells whether this is EVS manager or HAL implementation. 55 * 56 * @return result False for EVS manager implementations and true for all others. 57 */ 58 isHardware() generates (bool result); 59 60 /** 61 * Returns a list of all EVS displays available to the system 62 * 63 * @return displayIds Identifiers of available displays. 64 */ 65 getDisplayIdList() generates (vec<uint8_t> displayIds); 66 67 /** 68 * Get exclusive access to IEvsDisplay for the system 69 * 70 * There can be more than one EVS display objects for the system and this function 71 * requests access to the display identified by a given ID. If the target EVS display 72 * is not available or is already in use the old instance shall be closed and give 73 * the new caller exclusive access. 74 * When done using the display, the caller may release it by calling closeDisplay(). 75 * 76 * @param id Target display identifier. 77 * @return display EvsDisplay object to be used. 78 */ 79 openDisplay_1_1(uint8_t id) generates (IEvsDisplay display); 80 81 /** 82 * Returns a list of all ultrasonics array available to the system. 83 * Will return an empty vector if ultrasonics is not supported. 84 * 85 * @return ultrasonicsArrays A list of ultrasonics available for EVS service. 86 */ 87 getUltrasonicsArrayList() generates (vec<UltrasonicsArrayDesc> ultrasonicsArrays); 88 89 /** 90 * Gets the IEvsUltrasonicsArray associated with a ultrasonicsArrayId from a 91 * UltrasonicsDataDesc 92 * 93 * @param ultrasonicsArrayId A unique identifier of the ultrasonic array. 94 * @return evsUltrasonicsArray IEvsUltrasonicsArray object associated with a 95 * given ultrasonicsArrayId. 96 */ 97 openUltrasonicsArray(string ultrasonicsArrayId) generates ( 98 IEvsUltrasonicsArray evsUltrasonicsArray); 99 100 /** 101 * Return the specified IEvsUltrasonicsArray interface as no longer in use 102 * 103 * When the IEvsUltrasonicsArray object is no longer required, it must be released. 104 * NOTE: Data streaming must be cleanly stopped before making this call. 105 * 106 * @param evsUltrasonicsArray EvsUltrasonics array object to be closed. 107 */ 108 closeUltrasonicsArray(IEvsUltrasonicsArray evsUltrasonicsArray); 109}; 110