Skip to content
Snippets Groups Projects
Commit 4c87aa4f authored by Christoph Kampmeyer's avatar Christoph Kampmeyer
Browse files

Template server example:

  - Doocs .conf and variable mapping templates
  - Implemented ApplicationInstance.cc
  - Fixed working directory in CMakeLists.txt
parent 0697ca6a
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<device_server xmlns="https://github.com/ChimeraTK/ControlSystemAdapter-DoocsAdapter">
<location name="TEMPLATE_LOCATION">
<!-- Simply import all variables provided by the application
Adapt to your needs!
-->
<import>/</import>
</location>
</device_server>
eq_conf:
oper_uid: -1
oper_gid: 405
xpert_uid: 1000
xpert_gid: 1000
ring_buffer: 10000
memory_buffer: 500
eq_fct_name: "TEMPLATE_SERVER._SVR"
eq_fct_type: 1
{
SVR.RPC_NUMBER: 610498009
SVR.NAME: "TEMPLATE_SERVER._SVR"
SVR.BPN: 6000
}
eq_fct_name: "TEMPLATE_LOCATION"
eq_fct_type: 10
{
NAME: "TEMPLATE_LOCATION"
}
#name n_words address n_bytes BAR n_bits n_fractionalBits signed
FEATURE1.AREA 201 0 804 0 16 0 0
FEATURE2.AREA1 100 0 400 13 32 0 0
FEATURE2.AREA2 100 0 400 1 32 0 0
FEATURE2.AREA3 106 0 424 2 32 0 0
WORD_READ_ONLY_1 1 0 4 3 32 0 0 RO
WORD_READ_ONLY_2 1 4 4 3 32 0 0 RO
WORD_1 1 0 4 0 32 0 0 RW
MODULE_1.AREA 200 4 800 0 32 0 0 RW
......@@ -31,7 +31,7 @@ struct Server : public ctk::Application {
ctk::ConfigReader config{this, "Configuration", getName() + "_base_config.xml"};
ctk::ControlSystemModule cs;
ctk::DeviceModule dev{this, "Device"};
ctk::DeviceModule dev{this, "DummyDevice"};
TemplateModule templateModule{this, "TemplateModule", "This is a template module, adapt as needed!"};
......
#include "Server.h"
#include <ChimeraTK/ApplicationCore/EnableXMLGenerator.h>
/// The Server instance
static Server theServer;
......@@ -2,10 +2,6 @@
#include "Server.h"
#include "version.h"
#include <ChimeraTK/ApplicationCore/EnableXMLGenerator.h>
/// The Server instance
static Server theServer;
void Server::defineConnections() {
ctk::setDMapFilePath("devices.dmap");
......
......@@ -20,5 +20,9 @@ foreach( testExecutableSrcFile ${testExecutables})
LINK_FLAGS "${CMAKE_LINK_FLAGS}"
)
target_link_libraries(${excutableName} ${PROJECT_NAME}lib ${ChimeraTK-ApplicationCore_LIBRARIES} ${Adapter_LIBRARIES} )
add_test(${excutableName} ${CMAKE_CURRENT_BINARY_DIR}/${excutableName})
add_test(
NAME ${excutableName}
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${excutableName}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
endforeach( testExecutableSrcFile )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment