diff --git a/recipes-app/fofb-opcua-server/files/devices.dmap b/recipes-app/fofb-opcua-server/files/devices.dmap index 8565738dbd50b36b6ad019546a0cd6db998537df..acc412657d65a22e6749c9fa327ca1f55ba941ea 100644 --- a/recipes-app/fofb-opcua-server/files/devices.dmap +++ b/recipes-app/fofb-opcua-server/files/devices.dmap @@ -1 +1 @@ -CNUIO (uio:axiapp?map=/opt/fofb-opcua-server/app.mapt) +APPUIO (uio:axiapp?map=/opt/fofb-opcua-server/app.mapt) diff --git a/recipes-app/fofb-opcua-server/files/generic_chimeratk_server_configuration.xml b/recipes-app/fofb-opcua-server/files/generic_chimeratk_server_configuration.xml index 39e9e5bbad7fe77cf74599224b5099fd8ace7e1d..0edecb604d1511b7774ac027bf37cc8e99ccc61d 100644 --- a/recipes-app/fofb-opcua-server/files/generic_chimeratk_server_configuration.xml +++ b/recipes-app/fofb-opcua-server/files/generic_chimeratk_server_configuration.xml @@ -1,10 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> + <configuration> - <variable name="devices" type="string"> - <value i="0" v="APP"/> - </variable> - <module name="APP"> - <variable name="triggerPath" type="string" value="/manual/trigger" /> - <variable name="pathInDevice" type="string" value="" /> - <variable name="initScript" type="string" value="" /> - </module> + + <!-- Declare devices, aliases from .dmap file --> + <variable name="devices" type="string"> + <value i="0" v="APPUIO"/> + </variable> + + <!-- Declare timers for auto refresh --> + <variable name="periodicTimers" type="string"> + <value i="0" v="secTimer"/> + </variable> + + <!-- msTimer tick every second --> + <module name="secTimer"> + <variable name="period" type="uint32" value="1000" /> + </module> + + <!-- Configure device --> + <module name="APPUIO"> + <variable name="triggerPath" type="string" value="/manual/trigger" /> + <variable name="pathInDevice" type="string" value="" /> + <variable name="initScript" type="string" value="" /> + </module> + </configuration> diff --git a/recipes-app/fofb-opcua-server/fofb-opcua-server_0.1.bb b/recipes-app/fofb-opcua-server/fofb-opcua-server_0.1.bb index 48789d808c8b9fe46bba3ed5366413ba28b7d532..cbb714b45c1257c63ee6273c0a03ae4fec408cad 100644 --- a/recipes-app/fofb-opcua-server/fofb-opcua-server_0.1.bb +++ b/recipes-app/fofb-opcua-server/fofb-opcua-server_0.1.bb @@ -12,9 +12,14 @@ RDEPENDS_${PN}=" genericdeviceserver-opcua" FILES_${PN}+="/opt/fofb-opcua-server/*" +do_compile() { + # Replace BAR by 0 + awk 'FNR>1 {$5=0} {print}' ${WORKDIR}/app.mapt > ${WORKDIR}/app_bar0.mapt +} + do_install() { install -d ${D}/opt/fofb-opcua-server/ - install -m 0644 ${WORKDIR}/app.mapt ${D}/opt/fofb-opcua-server/app.mapt + install -m 0644 ${WORKDIR}/app_bar0.mapt ${D}/opt/fofb-opcua-server/app.mapt install -m 0644 ${WORKDIR}/devices.dmap ${D}/opt/fofb-opcua-server/devices.dmap install -m 0644 ${WORKDIR}/generic_chimeratk_server_configuration.xml ${D}/opt/fofb-opcua-server/generic_chimeratk_server_configuration.xml }