DataModel AML library (cpp)

datamodel-aml-cpp is a library which provides the way to present raw data(key/value based) to AutomationML(AML) standard format.

  • Transform raw data to AML data(XML).
  • Serialization / Deserialization AML data using protobuf.

Prerequisites

  • SCons

  • Protobuf

    • Version : 3.4.0(mandatory)
    • Protobuf will be installed by build option (See 'How to build')
    • Refer to the links below for manual installation.

How to build

  1. Goto: ~/datamodel-aml-cpp/

  2. Run the script:

    ./build.sh <options>         : Native build for x86_64
    ./build_32.sh <options>      : Native build for x86
    ./build_arm.sh <options>     : Native build for armhf [Raspberry pi board])
    ./build_arm64.sh <options>   : Native build for arm64 [Raspberry pi board])
    

Notes
(a) For getting help about script option: $ ./build.sh --help
(b) If you build for the first time, set install_prerequisites option true. (e.g. $./build.sh --install_prerequisites=true)
Then it will install the required libraries. In this case, script needs sudo permission for installing the libraries. In future need for sudo will be removed by installing those libraries in aml library.

How to run

Prerequisites

Built datamodel-aml-cpp library

Sample

  1. Goto: ~/datamodel-aml-cpp/out/linux/{ARCH}/{MODE}/samples/
  2. export LD_LIBRARY_PATH=../
  3. Run the sample:
     ./sample
    

Usage guide for datamodel-aml-cpp library (for microservices)

  1. The microservice which wants to use aml APIs has to link following libraries:

    (A) If microservice wants to link aml dynamically following are the libraries it needs to link:
    - aml.so
    (B) If microservice wants to link aml statically following are the libraries it needs to link:
    - aml.a
  2. Reference aml library APIs : docs/docs/html/index.html