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.
-
Go compiler
- Version : 1.9
- How to install
-
datamodel-aml-c
- Since datamodel-aml-c will be downloaded and built when datamodel-aml-go is built, check the prerequisites of it.
- Prerequisites
-
Goto: ~/datamodel-aml-go/
-
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
Built datamodel-aml-go package
-
Goto: ~/${GOPATH}/src/go/samples/
-
export LD_LIBRARY_PATH=../extlibs/
-
Run the sample:
./sample
Built datamodel-aml-go package.
-
Goto: ~/datamodel-aml-go/
-
Run the script
$ ./build.sh
-
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
- The microservice which wants to use aml GO library has to import aml package:
import go/aml
- Reference aml library APIs : doc/godoc/aml.html