Avm Android SDK目标在Android座舱域控制器(Android 平台),将以SDK的形式向客户提供,提供充足的接口来满足客户对AVM功能自定义构建,功能接口完善,开发解耦程度高,开发周期短,可帮助客户快速实现AVM产品的量产。

如图,java部分为客户应用。c++ 为Avm SDK实现。其中framework(非Android framework)为Avm SDK运行提供平台条件,纵目适配开发,Android Application可以交给客户实现:
绿色部分为客户定制开发,黄色部分为sdk开发内容。在实际使用过程中,局部架构可以进行调整,
zros是zongmu内部对自身系统的称呼)zros大体包含三部分,分别为zros_model,zros_framwork,和zros_algorithm。
zros_model:主要提供avm基础的功能,包含各个视图,以及和Android上层App交互的功能入口,这部份zongmu可以提供参考代码协助客户自行开发。其中涉及到接口主要由zros_framework和zros_algorithm来提供。
zros_framework:主要提供zros在各个硬件平台上运行的基础环境和核心功能接口,其中就包括图像资源的输入和输出。
zros_algorithm:为zongmu算法模块,其中包含3D图像的处理,视图模型的加载渲染,标定等功能,它主要通过zros_framework和zros_model进行数据的输入输出。
zros_ui interface:
// 功能接口
class SurroundViewUI
{
public:
SurroundViewUI();
~SurroundViewUI();
bool Init(DisplayConfig config);
void Deinit();
void Resume();
void Suspend();
bool TouchInput(int action, float x, float y)
void SetScreenSize(int width, int height);
void SetScreenRatio(int num, float ratio[]);
void onOrientationChanged(int screenDirection);
void SetCarResources(const std::string &car_type, const std::string &sub_car_type, const std::string &car_body_color, const std::string &resources_path);
void SetTouchEvent(int action, std::vector<std::pair<int, int>>posxy);
void SetAutomaticCalibration(); //need callback
void SetRadarAlertDrawable(int area, int state);
void SetRadarAlertEnable(int enable);
void SetCarDynamicShadowEnable(int enable);
void SetCarColor(int car_color);
void SetTrajVisible(int traj_type, int visible);
void SetAvmView(int viewId);
void GrantAuthorization(const std::string &car_info);
}
// 图像输入输出接口
class viewIO{
public:
bool InitCamera(CameraConfig config);
void DeinitCamera();
bool FillCameraFrameNv21FourInOne(void *data); //支持Android Camera2从App 层获取camera数据
bool RenderOneFrame();
}
//车机信号输入输出接口
class VehicleSignal{
public:
void SetVehicleDoorStatus(int doorIndex, int status);
void SetVehicleDirection(int direction);
void SetVehicleWheelPulse(int wheelSpeedPulse[], int cnt);
void SetVehicleSteerAngle(float steerAngle);
int GetVehicleMaxSteerAngle();
void SetVehicleSpeed(float vehicleSpeed);
void SetVehicleRadarDistance(int radarDistance[], int cnt);
void SetCarLampStatus(int type, int status);
void SetVehicleGear(int gear);
void SetCarVisible(int visible);
void SetCarShininess(float shininess);
void SetCarOpacity(float pacity);
void SetCarGlassOpacity(float glassOpacity);
void SetCarDirectionLampFlashPeriod(int period);
void SetCarInteriorVisible(int visible);
void SetCarLogoVisible(int visible);
void SetCarDoorRangeVisible(int visible);
void SetCarLicensePlateVisible(int visible);
void SetCarLicensePlateType(int type);
void SetCarLicensePlateText(const std::string &text);
int GetGearStatus() {return gear_status;}
void SetAvmLampViewSwitch(bool enable);
bool GetAvmLampViewSwitch();
}
// zros标定结果回调应用接口
int sendCalibrationResult(int resultData);