skeleton_sample_app

 

Table of contents


 

Introduction


This explanation assumes that the i-PRO camera application development environment has been completed.
If you are not ready to build the development environment, please refer to here to complete it.

Also, in this tutorial, the SDK installation directory is described as ${SDK_DIR}.

Operation overview


skeleton_sample_app is the base for application development. If this app is build and run, there are no features worth mentioning.
When creating a new application, copy the entire folder of skeleton_sample_app and use it.

 

External libraries required for operation


No special mention.

 

Directory path of the sample app


The C/C++ source code is stored below.

${SDK_DIR}/src/adamapp/skeleton_sample_app

No Python source code.

We recommend jpeg_app as a sample app that is the base for Python application development.

${SDK_DIR}/src/adamapp-py/jpeg_app

 

How to build the sample app (C/C++)


This article describes how to build it as AdamApp.
If you want to build it as Container AdamApp for Azure IoT Edge, see below.

Development tutorial (Container AdamApp for Azure IoT Edge) - Technology Partner FAQ (En) - Confluence (atlassian.net)

Load the build environment settings file in the SDK installation directory.

$ cd ${SDK_DIR} $ source setup_env.sh ipro-ambaCV2X

Set the build environment according to each environment.
Here, specify ipro-ambaCV2X.

 

make.

$ cd src/adamapp/skeleton_sample_app $ make

It is successful if the .ext file is created in ${SDK_DIR}/src/adamapp/skeleton_sample_app.

 

Install it on the camera (eg, you can install from the green frame in the image below). Select the created .ext file and install it.
Open the app screen (red frame button in the image below).

 

It is successful if a character string like the image below is displayed.

 

How to use the sample app


No noteworthy matters as it is the base for application development.

 

Appendix


Summary

This sample application has only system required event handlers.
The system event loop uses the main thread.

 

Event Handlers

  1. Stop Handler
    Called when stopApplication command requested.
    This sample handler call ADAM_Eventloop_Exit() for finish the main
    event loop.

  2. Server Request Receive Handler
    Called when sendDataToAdamApplication command requested.
    This sample handler returns
    - same m_type ( s_appDataType -> r_appDataType )
    - swapped capital character and small character ( s_appData -> r_appData )

 

Main program

performs the minimum procedure.

  1. ADAM_Open() : select ADAM_APP_TYPE_SKELETON

  2. ADAM_Eventloop_Dispatch() : Main event loop

  3. ADAM_Close()