Skip to content

Commit e419a03

Browse files
authored
Update for the SmartMDSD Toolchain version 3.11 (#4)
This update requires the SmartMDSD Toolchain version 3.11, the SmartSoft API version 1.1 and the ACE/SmartSoft Kernel version 3.2.
1 parent 336fbf6 commit e419a03

File tree

772 files changed

+19368
-4925
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

772 files changed

+19368
-4925
lines changed
4.76 KB
Loading
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
//--------------------------------------------------------------------------
2+
// Code generated by the SmartSoft MDSD Toolchain
3+
// The SmartSoft Toolchain has been developed by:
4+
//
5+
// Service Robotics Research Center
6+
// University of Applied Sciences Ulm
7+
// Prittwitzstr. 10
8+
// 89075 Ulm (Germany)
9+
//
10+
// Information about the SmartSoft MDSD Toolchain is available at:
11+
// www.servicerobotik-ulm.de
12+
//
13+
// Please do not modify this file. It will be re-generated
14+
// running the code generator.
15+
//--------------------------------------------------------------------------
16+
17+
#include "ComponentGMappingOpcUaBackendPortFactory.hh"
18+
19+
// include all potentially required pattern implementations
20+
#include <SeRoNetSDK/SeRoNet/OPCUA/Client/PushClient.hpp>
21+
#include <SeRoNetSDK/SeRoNet/OPCUA/Client/EventClient.hpp>
22+
#include <SeRoNetSDK/SeRoNet/OPCUA/Client/QClientOPCUA.hpp>
23+
#include <SeRoNetSDK/SeRoNet/OPCUA/Client/SendClient.hpp>
24+
#include <SeRoNetSDK/SeRoNet/OPCUA/Client/QueryClient.hpp>
25+
26+
#include <SeRoNetSDK/SeRoNet/OPCUA/Server/PushServer.hpp>
27+
#include <SeRoNetSDK/SeRoNet/OPCUA/Server/EventServer.hpp>
28+
#include <SeRoNetSDK/SeRoNet/OPCUA/Server/SendServer.hpp>
29+
#include <SeRoNetSDK/SeRoNet/OPCUA/Server/QueryServer.hpp>
30+
31+
// include referenced CommunicationObject SeRoNetSDK self description implementations
32+
#include "CommNavigationObjectsOpcUa/CommGridMapOpcUa.hh"
33+
#include "CommBasicObjectsOpcUa/CommMobileLaserScanOpcUa.hh"
34+
#include "CommBasicObjectsOpcUa/CommBasePositionUpdateOpcUa.hh"
35+
36+
// create a static instance of the OpcUaBackendPortFactory
37+
static ComponentGMappingOpcUaBackendPortFactory OpcUaBackendPortFactory;
38+
39+
ComponentGMappingOpcUaBackendPortFactory::ComponentGMappingOpcUaBackendPortFactory()
40+
{
41+
componentImpl = 0;
42+
ComponentGMapping::instance()->addPortFactory("OpcUa_SeRoNet", this);
43+
}
44+
45+
ComponentGMappingOpcUaBackendPortFactory::~ComponentGMappingOpcUaBackendPortFactory()
46+
{ }
47+
48+
void ComponentGMappingOpcUaBackendPortFactory::initialize(ComponentGMapping *component, int argc, char* argv[])
49+
{
50+
componentImpl = new SeRoNet::Utils::Component(component->connections.component.name);
51+
}
52+
53+
int ComponentGMappingOpcUaBackendPortFactory::onStartup()
54+
{
55+
if (!component_thread.joinable()) {
56+
component_thread = std::thread(&ComponentGMappingOpcUaBackendPortFactory::task_execution, this);
57+
return 0;
58+
}
59+
return -1;
60+
}
61+
62+
Smart::IPushClientPattern<CommBasicObjects::CommMobileLaserScan> * ComponentGMappingOpcUaBackendPortFactory::createLaserClient()
63+
{
64+
return new SeRoNet::OPCUA::Client::PushClient<CommBasicObjects::CommMobileLaserScan>(componentImpl);
65+
}
66+
67+
Smart::ISendClientPattern<CommBasicObjects::CommBasePositionUpdate> * ComponentGMappingOpcUaBackendPortFactory::createBasePositionUpdateClient()
68+
{
69+
return new SeRoNet::OPCUA::Client::SendClient<CommBasicObjects::CommBasePositionUpdate>(componentImpl);
70+
}
71+
72+
73+
Smart::IPushServerPattern<CommNavigationObjects::CommGridMap> * ComponentGMappingOpcUaBackendPortFactory::createNewestMapPushServer(const std::string &serviceName)
74+
{
75+
return new SeRoNet::OPCUA::Server::PushServer<CommNavigationObjects::CommGridMap>(componentImpl, serviceName);
76+
}
77+
78+
79+
int ComponentGMappingOpcUaBackendPortFactory::task_execution()
80+
{
81+
componentImpl->run();
82+
return 0;
83+
}
84+
85+
int ComponentGMappingOpcUaBackendPortFactory::onShutdown(const std::chrono::steady_clock::duration &timeoutTime)
86+
{
87+
// stop component-internal infrastructure
88+
componentImpl->stopRunning();
89+
// wait on component thread to exit
90+
if (component_thread.joinable()) {
91+
// FIXME: don't wait infinetly (use timeoutTime here)
92+
component_thread.join();
93+
}
94+
return 0;
95+
}
96+
97+
void ComponentGMappingOpcUaBackendPortFactory::destroy()
98+
{
99+
// clean-up component's internally used resources
100+
delete componentImpl;
101+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
//--------------------------------------------------------------------------
2+
// Code generated by the SmartSoft MDSD Toolchain
3+
// The SmartSoft Toolchain has been developed by:
4+
//
5+
// Service Robotics Research Center
6+
// University of Applied Sciences Ulm
7+
// Prittwitzstr. 10
8+
// 89075 Ulm (Germany)
9+
//
10+
// Information about the SmartSoft MDSD Toolchain is available at:
11+
// www.servicerobotik-ulm.de
12+
//
13+
// Please do not modify this file. It will be re-generated
14+
// running the code generator.
15+
//--------------------------------------------------------------------------
16+
17+
#ifndef COMPONENTGMAPPING_OPC_UA_BACKEND_PORTFACTORY_HH_
18+
#define COMPONENTGMAPPING_OPC_UA_BACKEND_PORTFACTORY_HH_
19+
20+
// include the main component-definition class
21+
#include "ComponentGMappingPortFactoryInterface.hh"
22+
23+
#include <thread>
24+
#include <chrono>
25+
26+
// include SeRoNetSDK library
27+
#include <SeRoNetSDK/SeRoNet/Utils/Task.hpp>
28+
#include <SeRoNetSDK/SeRoNet/Utils/Component.hpp>
29+
30+
class ComponentGMappingOpcUaBackendPortFactory: public ComponentGMappingPortFactoryInterface
31+
{
32+
private:
33+
// internal component instance
34+
SeRoNet::Utils::Component *componentImpl;
35+
36+
// component thread
37+
std::thread component_thread;
38+
39+
// internal component thread method
40+
int task_execution();
41+
public:
42+
ComponentGMappingOpcUaBackendPortFactory();
43+
virtual ~ComponentGMappingOpcUaBackendPortFactory();
44+
45+
virtual void initialize(ComponentGMapping *component, int argc, char* argv[]) override;
46+
virtual int onStartup() override;
47+
48+
virtual Smart::IPushClientPattern<CommBasicObjects::CommMobileLaserScan> * createLaserClient() override;
49+
virtual Smart::ISendClientPattern<CommBasicObjects::CommBasePositionUpdate> * createBasePositionUpdateClient() override;
50+
51+
virtual Smart::IPushServerPattern<CommNavigationObjects::CommGridMap> * createNewestMapPushServer(const std::string &serviceName) override;
52+
53+
virtual int onShutdown(const std::chrono::steady_clock::duration &timeoutTime=std::chrono::seconds(2)) override;
54+
virtual void destroy() override;
55+
};
56+
57+
#endif /* COMPONENTGMAPPING_SERONET_SDK_PORTFACTORY_HH_ */
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
2+
3+
FIND_PACKAGE(Open62541Cpp QUIET)
4+
SET(SmartSoft_CD_API_DIR $ENV{SMART_ROOT_ACE}/modules)
5+
FIND_PACKAGE(SeRoNetSDK QUIET)
6+
7+
IF(SeRoNetSDK_FOUND)
8+
FIND_PACKAGE(CommBasicObjectsOpcUa PATHS $ENV{SMART_ROOT_ACE}/modules)
9+
FIND_PACKAGE(CommNavigationObjectsOpcUa PATHS $ENV{SMART_ROOT_ACE}/modules)
10+
SET(CMAKE_CXX_STANDARD 14)
11+
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR})
12+
SET(OPC_UA_BACKEND_SRCS "${CMAKE_CURRENT_LIST_DIR}/ComponentGMappingOpcUaBackendPortFactory.cc")
13+
ENDIF(SeRoNetSDK_FOUND)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//--------------------------------------------------------------------------
2+
// Code generated by the SmartSoft MDSD Toolchain
3+
// The SmartSoft Toolchain has been developed by:
4+
//
5+
// Service Robotics Research Center
6+
// University of Applied Sciences Ulm
7+
// Prittwitzstr. 10
8+
// 89075 Ulm (Germany)
9+
//
10+
// Information about the SmartSoft MDSD Toolchain is available at:
11+
// www.servicerobotik-ulm.de
12+
//
13+
// Please do not modify this file. It will be re-generated
14+
// running the code generator.
15+
//--------------------------------------------------------------------------
16+
17+
// Generated with SmartMDSD Toolchain Version 3.11.0.201911291144

ComponentGMapping/representations.aird

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@
231231
</edges>
232232
</data>
233233
</ownedAnnotationEntries>
234-
<ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_eptNhFatEemGTONLu6jrqw" name="ComponentGMapping" tooltipText="ComponentDefinition">
234+
<ownedDiagramElements xmi:type="diagram:DNodeContainer" uid="_eptNhFatEemGTONLu6jrqw" name="ComponentGMapping" tooltipText="ComponentDefinition: ComponentGMapping&#xA;">
235235
<target xmi:type="ComponentDefinition:ComponentDefinition" href="model/ComponentGMapping.component#//@component"/>
236236
<semanticElements xmi:type="ComponentDefinition:ComponentDefinition" href="model/ComponentGMapping.component#//@component"/>
237-
<ownedBorderedNodes xmi:type="diagram:DNode" uid="_mFBIgFatEemGTONLu6jrqw" name="laserClient" tooltipText="InputPort" width="3" height="3" resizeKind="NSEW">
237+
<ownedBorderedNodes xmi:type="diagram:DNode" uid="_mFBIgFatEemGTONLu6jrqw" name="laserClient" tooltipText="InputPort: laserClient&#xA;" width="3" height="3" resizeKind="NSEW">
238238
<target xmi:type="ComponentDefinition:InputPort" href="model/ComponentGMapping.component#//@component/@elements.0"/>
239239
<semanticElements xmi:type="ComponentDefinition:InputPort" href="model/ComponentGMapping.component#//@component/@elements.0"/>
240240
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>

ComponentGMapping/smartsoft/src-gen/ComponentGMapping.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ ComponentGMapping::ComponentGMapping()
7272
connections.gMappingTask.priority = -1;
7373
connections.gMappingTask.cpuAffinity = -1;
7474

75+
// initialize members of OpcUaBackendComponentGeneratorExtension
76+
7577
// initialize members of ComponentGMappingROSExtension
7678

7779
// initialize members of PlainOpcUaComponentGMappingExtension
@@ -201,6 +203,8 @@ void ComponentGMapping::init(int argc, char *argv[])
201203
// print out the actual parameters which are used to initialize the component
202204
std::cout << " \nComponentDefinition Initial-Parameters:\n" << COMP->getParameters() << std::endl;
203205

206+
// initializations of OpcUaBackendComponentGeneratorExtension
207+
204208
// initializations of ComponentGMappingROSExtension
205209

206210
// initializations of PlainOpcUaComponentGMappingExtension
@@ -407,6 +411,8 @@ void ComponentGMapping::fini()
407411
portFactory->second->destroy();
408412
}
409413

414+
// destruction of OpcUaBackendComponentGeneratorExtension
415+
410416
// destruction of ComponentGMappingROSExtension
411417

412418
// destruction of PlainOpcUaComponentGMappingExtension
@@ -527,6 +533,8 @@ void ComponentGMapping::loadParameter(int argc, char *argv[])
527533
parameter.getInteger("GMappingTask", "cpuAffinity", connections.gMappingTask.cpuAffinity);
528534
}
529535

536+
// load parameters for OpcUaBackendComponentGeneratorExtension
537+
530538
// load parameters for ComponentGMappingROSExtension
531539

532540
// load parameters for PlainOpcUaComponentGMappingExtension

ComponentGMapping/smartsoft/src-gen/ComponentGMapping.hh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
class ComponentGMappingPortFactoryInterface;
3030
class ComponentGMappingExtension;
3131

32+
// includes for OpcUaBackendComponentGeneratorExtension
33+
3234
// includes for ComponentGMappingROSExtension
3335

3436
// includes for PlainOpcUaComponentGMappingExtension
@@ -49,8 +51,8 @@ class ComponentGMappingExtension;
4951
// include UpcallManagers
5052
#include "LaserClientUpcallManager.hh"
5153

52-
// include input-handler
53-
// include input-handler
54+
// include input-handler(s)
55+
// include request-handler(s)
5456

5557
// include handler
5658
#include "CompHandler.hh"
@@ -123,6 +125,8 @@ public:
123125

124126
// define request-handlers
125127

128+
// definitions of OpcUaBackendComponentGeneratorExtension
129+
126130
// definitions of ComponentGMappingROSExtension
127131

128132
// definitions of PlainOpcUaComponentGMappingExtension
@@ -250,6 +254,8 @@ public:
250254
std::string roboticMiddleware;
251255
} laserClient;
252256

257+
// -- parameters for OpcUaBackendComponentGeneratorExtension
258+
253259
// -- parameters for ComponentGMappingROSExtension
254260

255261
// -- parameters for PlainOpcUaComponentGMappingExtension

ComponentGMapping/smartsoft/src-gen/ComponentGMapping.ini.head

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ wiringName laserClient
7575
interval 1
7676
roboticMiddleware ACE_SmartSoft
7777

78+
##########################
79+
## parameters of OpcUaBackendComponentGeneratorExtension
80+
7881
##########################
7982
## parameters of ComponentGMappingROSExtension
8083

ComponentGMapping/smartsoft/src-gen/ComponentGMapping.ini.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ wiringName laserClient
7575
interval 1
7676
roboticMiddleware ACE_SmartSoft
7777

78+
##########################
79+
## parameters of OpcUaBackendComponentGeneratorExtension
80+
7881
##########################
7982
## parameters of ComponentGMappingROSExtension
8083

0 commit comments

Comments
 (0)