This document provides information about the "Air Vantage Dev Tree v2 application".

This is not actually an application on its own.  Rather, it is a library that
acts as an adapter between the an Air Vantage communication agent (such as the
Sierra Wireless "Ready Agent") and the Sierra Linux QMI SDK, effectively making
a connected Qualcomm QMI-based modem device available for management via the
Sierra Wireless Air Vantage web services platform.

*******************
Before Compilation
*******************
- Obtain a copy of the Device Management Tree Specification, Version 2 header file
  (devtree_v2.h).  A copy of this file is included in the source tree of this
  "sample application", but it's possible that it is out of date.  Please check
  that you have the latest version.  Its home is in Confluence, at the following
  address: https://confluence.sierrawireless.com/display/PLT/AVMS+AWTDA+Dev+Tree
  
- Open the "makefile" in a text editor and set the following variables:
    - READY_AGENT_DIR --> path to the root of the Ready Agent source tree.
    - DEVTREE_V2_PATH --> path to the directory containing the devtree_v2.h file.
  NOTE: Obviously, the makefile's "install" rules will have to be tailored further
  if this adapter library is to be used with a different Air Vantage communications
  agent other than the Ready Agent.

- Save the makefile.

************
Compilation
************
Just run "make" to build the adapter library and install it into the Ready Agent
(or other Air Vantage communications agent).

- By default, the application is compiled for i86 platform.

- The application can be compiled for different platform using the CPU option:
  "make CPU=<platform>"
  where <platform> = arm9 in case 0f ARM and
                     ppc  in case of Power PC.
- For arm9 and powerpc, platform specific toolchains are required. These must be
  installed to the $(HOME) directory once, and can be used for all SDK workspaces.
  If they do not exist, 
  "make CPU=arm9" and
  "make CPU=ppc"  will simply fail.

*****
SDK
*****
- The SDK executable path must be specified in the makefile before compiling.
  You shouldn't need to change this, but if you do, it is specified using the
  SLQSSDK_PATH variable.

**********
Execution
**********
- The library is loaded automatically and used as needed by the Air Vantage
  communications agent (e.g., Ready Agent).

**********************************
Adding More Device Tree Variables
**********************************
 To add support for more device tree variables, implement more of the functions
 defined in the Device Management Tree Specification header file (devtree_v2.h).
 This can generally be done by:
  1. Copying function prototypes from devtree_v2.h into a .c file under
        SampleApps/Air_Vantage_Dev_Tree_v2/src
  2. Implementing the body of those functions (using SLQS API functions to access
        the modem).
 
 The files under SampleApps/Air_Vantage_Dev_Tree_v2/src are named according to
 the section of the Device Management Tree Specification that they implement.
 For example, variables found under the "system.cellular" branch of the tree
 are implemented in the file "cellular.c".

 If you need to add a new .c file for a new section of the specification,
  1. Create the .c file under SampleApps/Air_Vantage_Dev_Tree_v2/src.
  2. Add the name of the .c file to the "SOURCES" list in
        SampleApps/Air_Vantage_Dev_Tree_v2/makefile.

 In addition to the Dev Tree v2 accessor function implementation modules, there is
 the module "main.c".  This file implements the adapter library's start-up code
 (library constructor).  This is the part of the adapter that starts-up the SLQSDK
 and attaches to the SLQSDK Daemon process.  This module also
  - exports a function to other modules that allows them to fetch the current
        device mode, and
  - implements the special function dt2_GetDeviceId() that fetches the identifier
        used to identify the device to the Air Vantage platform.

**********************************
Supported Device Tree Variables
**********************************
The spreadsheet ReadyAgent-DevTree2-attributes-for-SLQS.xls listed variables and their
associate C api

