Giter VIP home page Giter VIP logo

datamodel-aml-go's Introduction

DataModel AML library (go)

datamodel-aml-go is a go binding written over datamodel-aml-c, that 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

  • Go compiler

  • datamodel-aml-c

    • Since datamodel-aml-c will be downloaded and built when datamodel-aml-go is built, check the prerequisites of it.
    • Prerequisites

How to build

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

  2. Run the script:

    ./build.sh         : Native build for x86_64
    ./build_32.sh      : Native build for x86
    ./build_arm.sh     : Cross compile build for armhf
    ./build_arm64.sh   : Cross compile build for arm64
    ./unittests.sh     : Native unit tests build for x86_64 [It will first build aml library after that unittests]
    

Note:
For getting help about script option: $ ./build_common.sh --help

How to run

Prerequisites

Built datamodel-aml-go package

sample

  1. Goto: ~/${GOPATH}/src/go/samples/

  2. export LD_LIBRARY_PATH=../extlibs/

  3. Run the sample:

    ./sample
    

Unit test and code coverage report [x86_64 arch]

Pre-requisite

Built datamodel-aml-go package.

Run the unit test cases and generate coverage report

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

  2. Run the script
    $ ./build.sh

  3. To open coverage report in web browser:
    (a) Goto: ~/datamodel-aml-go/src/go/unittests

    (b) $ go tool cover -html=coverage.out ย 

Note:
For running unit test for other architecture please refer ~/datamodel-aml-go/src/go/unittests/build.sh

Usage guide for aml library (For micro-services)

  1. The microservice which wants to use aml GO library has to import aml package: import go/aml
  2. Reference aml library APIs : doc/godoc/aml.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.