diff --git a/CDB/unb2-sim-config.json b/CDB/unb2-sim-config.json new file mode 100644 index 0000000000000000000000000000000000000000..a98fa27492e3835867b214cfd2789caf949de460 --- /dev/null +++ b/CDB/unb2-sim-config.json @@ -0,0 +1,23 @@ +{ + "servers": { + "UNB2": { + "LTS": { + "UNB2": { + "LTS/UNB2/1": { + "properties": { + "OPC_Server_Name": [ + "unb2-sim" + ], + "OPC_Server_Port": [ + "4844" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + } + } +} diff --git a/docker-compose/unb2-sim.yml b/docker-compose/unb2-sim.yml new file mode 100644 index 0000000000000000000000000000000000000000..e031e20f54ad6addec1fdbabf972661d6f4c8f9a --- /dev/null +++ b/docker-compose/unb2-sim.yml @@ -0,0 +1,20 @@ +# +# Docker compose file that launches a UNB2 simulator +# +# Defines: +# - unb2-sim +# +version: '2' + +services: + unb2-sim: + build: + context: unb2-sim + container_name: ${CONTAINER_NAME_PREFIX}unb2-sim + networks: + - control + volumes: + - ${HOME}:/hosthome + ports: + - "4844:4844" + restart: on-failure diff --git a/docker-compose/unb2-sim/Dockerfile b/docker-compose/unb2-sim/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4a6b1acfc2048c1368ec0355aab6822e82dd31aa --- /dev/null +++ b/docker-compose/unb2-sim/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:20.04 + +COPY requirements.txt /requirements.txt + +ENV A = A + +RUN apt-get update && apt-get install -y python3 python3-pip python3-yaml git && \ + pip3 install -r requirements.txt && \ + git clone --depth 1 --branch master https://git.astron.nl/lofar2.0/pypcc + +WORKDIR /pypcc +CMD ["python3","pypcc2.py","--simulator", "--port=4844", "--config=UNB2"] diff --git a/docker-compose/unb2-sim/requirements.txt b/docker-compose/unb2-sim/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..5badf0e57069366adedc43ca2c2b59dc7dc4b35d --- /dev/null +++ b/docker-compose/unb2-sim/requirements.txt @@ -0,0 +1,4 @@ +#check if this file is necessary +opcua +numpy +recordclass>=0.16,<0.16.1 \ No newline at end of file