-
Notifications
You must be signed in to change notification settings - Fork 0
OPC-UA Plugin Server: First commit #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
First version including: * ACAP Code * Documentation * Open source information Change-Id: Ia86659a120fcb728dfb1c373495ca24162416242
Check if the UID/GID already exist before attempting to add them to the Docker image. Reuse their associated names in case they already exist. Change-Id: Ie1f4aa22dd47e33f9cdfdd8865912c3eba02c349
Change-Id: I42c325178626b1775b766d7397d3d1bb899e0932
Change-Id: I3f5c729aef58cf3167ea5c4a33aba63c5e0316c2
Change-Id: I6b4f79f27098d8d5f4f17c2eeb75974b20def52e
Change-Id: I19bff150c3de803ffe12b15ca71066d3f9ed070a
Change-Id: I917e8504c72700f8ec3a3dc9058e27ba22dd8e2c
Change-Id: Ibc08dfccb2e725ff4c8992dad074fdb41b2d3063
Change-Id: I8e4ecdd14cd0f23a0953ef13bb464a0360d655ae
Change-Id: I68edcb41f8bb51a838e250153631911547656ef5
Change-Id: I8e7aff33d29d96aff6fb466b6b7a005ad6891cb7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the documentation there is this guide for how to install third party libraries: https://developer.axis.com/acap/develop/include-third-party-libraries/, where it is recommended to install into the opt/build directory and then move the files to opt/app/lib. Then in the Makefile you have to provide:
LDLIBS += -Llib/
CFLAGS += -Ilib/include
SHLIB_DIR = ./lib
LDFLAGS = -L$(SHLIB_DIR) -Wl,--no-as-needed,-rpath,'$$ORIGIN/lib'
SHLIBS += -lm -l[lib](linking-third-party-lib)
I am not set on that the documentation shows the "best" way, so I'm interested to learn how you install third party libraries here, and why you don't need to specify a .e.g., rpath in your Makefile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We kind of "inherited" the example(s) provided by Core Tech Systems (including their Dockerfile) and we just went with it. In this case we use static linking to link with libopen62541.a.
* Docker - remove dobule ARG ARCH=aarch64 * README - rename section header Change-Id: I9b247ce64f752f7414cfa902a5b6d6058798d145
| CFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags $(PKGS)) | ||
| LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs $(PKGS)) | ||
|
|
||
| LIB_OPEN62541 = $(SDKTARGETSYSROOT)/usr/lib/libopen62541.a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this lib already installed in the firmware on the devices listed as supported below? I cannot find it on my device and no installation of it in these makefiles either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Open62541 lib is built and installed in the dockerfile, so when building the application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its line 94-104 in the dockerfile? Have you considered to bundle the lib with the ACAP instead? Here's an example of this: https://github.com/AxisCommunications/acap-native-sdk-examples-staging/tree/main/utility-libraries/custom_lib_example/app/custom_build
That way the library are automatically uninstalled with the ACAP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, lines 94-104 are correct. As mentioned previously in the conversation above, we went with the example provided by Core Tech Systems and haven't considered changing it since it's working. If you think it's necessary, we could of course change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That way the library are automatically uninstalled with the ACAP
We build open62541 as a static library and link with it. It's only our ACAP that uses this library. Uninstalling the ACAP will not leave any library hanging behind on the Axis device.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we ask this question, how is the lib supposed to be removed when the ACAP is uninstalled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then I'm fine with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it it's still unclear but the open62541 library is built inside the development container, it will never make it as a separate library onto the Axis device. We use static linking so it will be part of the binary executable - the ACAP application itself.
| status = UA_Server_run(ctx->server, &ctx->ua_server_running); | ||
|
|
||
| LOG_D(&ctx->logger, "UA Server exit status: %s", UA_StatusCode_name(status)); | ||
| UA_Server_delete(ctx->server); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the implementation of this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure which function you're referring to but both of these functions are from the open62541-lib.
Change-Id: I8ce2dfd95db4b79ef7d3c9252dc591b972c26b70
Change-Id: I42193fec0561992e265cd7d8530863f2242fb7db
Change-Id: Ia897b0b7e928a09705e4dd294c223e31fbfe7efe
Change-Id: I8b3fc584b3af41ddb1df19f383abdfb87a1c1504
First version including:
Change-Id: Ia86659a120fcb728dfb1c373495ca24162416242
Describe your changes
Please include a summary of the change, a relevant motivation and context.
Issue ticket number and link
Checklist before requesting a review