Git Product home page Git Product logo

umati / sample-server Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 16.0 2.19 MB

Sample-Server implementation based on open62541, showcases umati endorsed OPC UA companion specifications. Provides a :whale2: :package: to run locally for development purpose.

Home Page: https://umati.org

License: Mozilla Public License 2.0

CMake 3.64% C++ 93.09% Dockerfile 0.40% Shell 0.26% Python 0.50% Jinja 2.11%
companion-specification docker-image machine-tools opc-ua-instance opcua opcua-server open62541 robotics simulated-machine umati vdma vdw

sample-server's People

Contributors

basyskom-hlei avatar ccvca avatar christophruckstetter avatar dependabot[bot] avatar goetzgoerisch avatar kantiran91 avatar karstenroethig avatar kpm-berlin avatar mend-bolt-for-github[bot] avatar mindonwarp avatar renovate-bot avatar renovate[bot] avatar tonjaheinemann avatar tradias avatar wlkrm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sample-server's Issues

TODOS PubSub MQTT

  • Dynamic Lists: Add and remove DataSetWriter dynamically.
  • Changing properties: Update DataSetMetaData and republish them.
  • Open issue for bug with abstract DataTypes (Segfault in open62541 bc the rely on non abtract types with UA_TYPES[...]
  • Events
  • MessagId
  • Use reflection to identify dataSetWriters, writerGroups, etc.
  • Automatically remove DataSetWriters on Deletion (e.g. FullMachineToolDynamic)

Reporting a vulnerability

Hello!

I hope you are doing well!

We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.

Can you enable it, so that we can report it?

Thanks in advance!

PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository

Simplify CMakelists.txt

Use Targets created by open62541.

ua_generate_nodeset_and_datatypes(
        NAME "di"
        TARGET_PREFIX "${PROJECT_NAME}"
        FILE_CSV "${PROJECT_SOURCE_DIR}/nodeset/Published/OpcUaDiModel/OpcUaDiModel.csv"
		FILE_BSD "${PROJECT_SOURCE_DIR}/nodeset/Published/OpcUaDiModel/Opc.Ua.Di.Types.bsd"
        OUTPUT_DIR "${GENERATE_OUTPUT_DIR}"
	# This namespace index must match the order in which you are adding the nodeset in the source code
        NAMESPACE_MAP "2:http://opcfoundation.org/UA/DI/"
		FILE_NS "${PROJECT_SOURCE_DIR}/nodeset/Published/OpcUaDiModel/Opc.Ua.Di.NodeSet2.xml"
)

add_dependencies(${PROJECT_NAME}
				 ${PROJECT_NAME}-ns-di)

Image not available

Hi there,

I tried to pull the image according to the documentation with docker pull ghcr.io/umati/sample-server:main.
But I get

main: Pulling from umati/sample-server
manifest unknown

Futhermore, the public instance at opc.tcp://opcua.umati.app:4840 is not accessible for me.

Container image "main" draws 100% CPU on one core

The current "main" container image does draw 100% CPU after some time. This might also apply to the newest release, as this was build at the same time.

It looks like this is resolved on develope. If this does not occure on develop, I suggest to update main branch and container image.

PS: Long running test of develop started.

Discovery URL count and Endpoint Count defer

With #735 the new open62541 configuration was introduced.

When discovering the endpoints of the server the following log entry is logged in a UA Client:

NoOfDiscoveryUrls of FindServers (1) differs from the one received in GetEndpoints (2)

This is the output of the browsing:
image

cmake fails

Hi,
is it correct, that building the system without docker will fail ?

My output looks like:

-- Found PythonInterp: /usr/bin/python (found version "2.7.18")
-- Found MbedTLS: /usr/include
CMake Error at CMakeLists.txt:9 (find_package):
By not providing "FindOpen62541Cpp.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Open62541Cpp", but CMake did not find one.

Could not find a package configuration file provided by "Open62541Cpp" with
any of the following names:

Open62541CppConfig.cmake
open62541cpp-config.cmake

Add the installation prefix of "Open62541Cpp" to CMAKE_PREFIX_PATH or set
"Open62541Cpp_DIR" to a directory containing one of the above files. If
"Open62541Cpp" provides a separate development package or SDK, be sure it
has been installed.

How to BUILD_SHARED_LIBS

What is the correct approach to build with shared libs ?
I changed Dockerfile section to
[...]
RUN cmake /src/Sample-Server/.github/
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_INSTALL_PREFIX:PATH=/install /build &&
cmake --build .
[...]
But during build CMake says manually BUILD_SHARED_LIBS is not used.

EPIC: Stabilize SampleServer

User Story:
As an exhibitor, I want to have a stable SampleServer that is always on display so that I can always show my visitors something.
Currently the sampleserver is prone to DoS, reason unknown.

GMS SensorType example

Hi guys ๐Ÿ‘‹

I started working on the implementation of the Equipment->Tools part of the GMS companion spec and I am having trouble with finding an example implementation of the SensorType (subtype of ToolType from MachineTool NS).

All the example machines currently implemented in the Sample-Server use the ToolType and MultiToolType for Tools. Even machines derived from GMSType.

Would it be possible for someone to implement an example machine that uses all the types defined in the GMS spec?

That would be very helpful as I am using the Sample-Server as a reference.

Best regards,
Alen

Memory leak in VM

After VM went offline and required a reset I found that the Sample Server memory use grows over time. Here's overall VM memory consumption:
image

And this is memory (in MiB) used by Sample Server container after fresh restart:
image

The container also uses 25-30% of the VM CPU.

Could not reproduce locally, memory use for the Linux binary increased by <2% in an hour, local container looks similar. Can this be related to the number of client requests?

Image used: latest develop, sha256:fe03be93684d641e2abe22342f7b25c7ca03fd8b2ead490ca3f1935f6b063ef7
Compose config:

  server-cpp:
    container_name: server-cpp
    image: ghcr.io/umati/sample-server:develop
    ports:
      - 4840:4840
    volumes:
      - ./config/server_config.json:/configuration.json
      - ./config/server_cert.der:/server_cert.der
      - ./config/server_key.der:/server_key.der
    restart: always
    healthcheck:
      test: netstat -ltn | grep -c 4840

@ccvca, @Kantiran91 any ideas?

How to declare HasInterface Reference in TypeDefinitions

Hi,

we have a case where an Object should be of Type "BaseObjectType" and should have a HasInterface Reference to another type. What needs to be done in the TypeDefinition to achive this?

The concrete example currently looks this this. The State Object should have a HasInterface Reference to another Type

namespace woodworking{
struct WwMachine_t {
  BindableMember<MachineIdentification_t> Identification;
  BindableMember<ns0::BaseObject_t> State;
};
}  // namespace woodworking

REFL_TYPE(
  woodworking::WwMachine_t ,
  UmatiServerLib::attribute::UaObjectType(UmatiServerLib::constexp::NodeId(constants::NsWoodworkingUri, UA_WOODWORKINGID_WWMACHINETYPE)))
REFL_FIELD(
  Identification,
  UmatiServerLib::attribute::UaBrowseName(constants::NsDIUri))
REFL_FIELD(
  State
)

Configuration

I pulled the docker image and it runs just perfectly. I can monitor the Server on the same computer with UAExpert.
I now want to monitor the server from another computer in the same network with UAExpert. I tried the following when running the docker image:

docker run -d -p 147.87.39.101:4840:4840 ghcr.io/umati/sample-server:main

This didn't work though. I've read in the Readme that the server by default looks for a file configuration.json. I just don't know where to find it on my computer or whether I have to create on. And if I have to in which path.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
.gitpod.Dockerfile
  • gitpod/workspace-full 2023-03-24-22-45-37
Dockerfile
  • alpine 3.19.1
  • alpine 3.19.1
git-submodules
.gitmodules
  • deps/open62541 1.4@4d0b97ecbdc8b46930c368f8a5b45272982724cd
  • deps/googletest main@2954cb8d879886403d55343f941ae7d0216e0f6b
  • deps/open62541Cpp master@5f3b7cf4a5fb7997036d40def96e6afbe8196e4a
  • deps/refl-cpp master@27fbd7d2e6d86bc135b87beef6b5f7ce53afd4fc
  • deps/json develop@8c391e04fe4195d8be862c97f38cfe10e2a3472e
github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/upload-artifact v4
  • actions/checkout v4
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3.3.0
  • docker/login-action v3.1.0
  • docker/build-push-action v5.3.0
  • ubuntu 22.04
.github/workflows/codeql-analysis.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • ubuntu 22.04
.github/workflows/delete-images.yml
  • actions/github-script v7.0.1
.github/workflows/linter.yml
  • actions/checkout v4.1.4
  • super-linter/super-linter v6.0.0
  • actions/checkout v4.1.4
  • PuneetMatharu/cmake-format-lint-action v1.0.4
  • ubuntu 22.04
  • ubuntu 22.04
.github/workflows/rebase.yml
  • actions/checkout v4
  • cirrus-actions/rebase 1.8
pip_requirements
tools/certGen/requirements.txt
  • Jinja2 ==3.1.3
  • MarkupSafe ==2.1.5
regex
Dockerfile
  • alpine_3_18/bash 5.2.21-r0
  • alpine_3_18/cmake 3.27.8-r0
  • alpine_3_18/gcc 13.2.1_git20231014-r0
  • alpine_3_18/git 2.43.0-r0
  • alpine_3_18/make 4.4.1-r2
  • alpine_3_18/python3 3.11.9-r0
  • alpine_3_18/patch 2.7.6-r10
  • alpine_3_18/linux-headers 6.5-r0

  • Check this box to trigger a request for Renovate to run again on this repository

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.