Skip to content

Commit

Permalink
Update repositories for SmartMDSD Toolchain v3.11
Browse files Browse the repository at this point in the history
This update requires the SmartMDSD Toolchain version 3.11
  • Loading branch information
alex-lotz authored Dec 2, 2019
2 parents 482e22b + 46ec8e2 commit 767a35f
Show file tree
Hide file tree
Showing 682 changed files with 22,712 additions and 609 deletions.
29 changes: 29 additions & 0 deletions CommBasicObjects/bin/CommBasicObjects.parameters
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,33 @@ ParameterSetRepository CommBasicObjects {
}
}

ParameterSet VisualizationParams {
Trigger SHOW_BASE1 {}
Trigger STOP_BASE1 {}

Trigger SHOW_LASER1 {}
Trigger STOP_LASER1 {}

Trigger SHOW_LASER2 {}
Trigger STOP_LASER2 {}

Trigger SHOW_LASER3 {}
Trigger STOP_LASER3 {}

Trigger SHOW_IR1 {}
Trigger STOP_IR1 {}

Trigger SHOW_MAP1 {}
Trigger STOP_MAP1 {}

Trigger SHOW_RGB1 {}
Trigger STOP_RGB1 {}

Trigger SHOW_RGBD1 {}
Trigger STOP_RGBD1 {}

Trigger SHOW_DEPTHIMAGE1 {}
Trigger STOP_DEPTHIMAGE1 {}
}

}
37 changes: 24 additions & 13 deletions CommBasicObjects/bin/CommBasicObjects.services
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ ServiceDefRepository CommBasicObjects version 1.0
// Dennis 31 Oct. 2018
/*ForkingServiceDefinition BasePositionUpdateService {
PushPattern<DataType=CommBasicObjects.CommBasePositionUpdate>
}*/


}*/

RequestAnswerServiceDefinition BaseStateQueryService {
QueryPattern <
Expand All @@ -79,15 +77,6 @@ ServiceDefRepository CommBasicObjects version 1.0
ParameterPattern < EmptyDefaultParameterSet >
}

CoordinationServiceDefinition BaseCoordinationService {
StatePattern < lifecycle ComponentLifecycle with CommBasicObjects.BasicModes >
ParameterPattern < CommBasicObjects.BaseParams >
CommunicationServiceUsage baseState uses BaseStateQueryService
//OptionalCoordinationService bumperEvent references
//OptionalCoordinationService batteryEvent references

}

ForkingServiceDefinition IMUData {
PushPattern<DataType=CommBasicObjects.CommIMUData>
}
Expand All @@ -100,6 +89,14 @@ ServiceDefRepository CommBasicObjects version 1.0
>
}

ForkingServiceDefinition BatteryEventService{
EventPattern <
ActivationType = CommBasicObjects.CommBatteryParameter
EventStateType = CommBasicObjects.CommBatteryState
EventType = CommBasicObjects.CommBatteryEvent
>
}


ForkingServiceDefinition LaserSafetyEventService {
EventPattern <
Expand Down Expand Up @@ -169,4 +166,18 @@ ServiceDefRepository CommBasicObjects version 1.0
SendPattern < DataType = CommBasicObjects.CommSkillMsg>
}

}
CoordinationServiceDefinition LaserFromRGBDCoordinationService{
ParameterPattern < EmptyDefaultParameterSet >
StatePattern < lifecycle ComponentLifecycle with CommBasicObjects.LaserGenModes>
}

CoordinationServiceDefinition VisualizationCoordinationService {
ParameterPattern <CommBasicObjects.VisualizationParams>
StatePattern < lifecycle ComponentLifecycle >
}

ForkingServiceDefinition UltrasonicService {
PushPattern<DataType=CommBasicObjects.CommMobileUltrasonicScan>
}

}
12 changes: 12 additions & 0 deletions CommBasicObjects/bin/CommBasicObjects.types
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ CommObjectsRepository CommBasicObjects version 1.0.0 {
baseVelocity: CommBaseVelocity
baseOdomVelocity: CommBaseVelocity
batteryState: CommBatteryLevel
baseBumperState : CommBumperState
}
CommObject CommBasePose {
covInvalid: Boolean
Expand Down Expand Up @@ -107,6 +108,17 @@ CommObjectsRepository CommBasicObjects version 1.0.0 {
ROBOT_TURRET_COMPONENT
}


CommObject CommBumperState {
bumperState : BumperStateType = BUMPER_NOT_SUPPORTED
}

Enumeration BumperStateType {
BUMPER_NOT_SUPPORTED
BUMPER_NOT_PRESSED
BUMPER_PRESSED
}

Enumeration BumperEventType {
BUMPER_UNKNOWN
BUMPER_NOT_PRESSED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PROJECT(DefaultCoordinationService)

# find SmartSoft package
#FIND_SMARTSOFT(3.0)
FIND_PACKAGE(AceSmartSoft PATHS $ENV{SMART_ROOT_ACE}/build)
FIND_PACKAGE(AceSmartSoft PATHS $ENV{SMART_ROOT_ACE}/modules)

# these are the regular includes (add your own includes, if needed)
INCLUDE_DIRECTORIES(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <cstring>
#include <cstdlib>

#include <smartNumericCorrelationId.h>

void DefaultCoordinationServiceCore::addNewModuleInstance(const std::string& name){
std::cout<<"addNewModuleInstance name:"<<name<<std::endl;
DefaultCoordinationService mi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PROJECT(KBCoordinationService)

# find SmartSoft package
#FIND_SMARTSOFT(3.0)
FIND_PACKAGE(AceSmartSoft PATHS $ENV{SMART_ROOT_ACE}/build)
FIND_PACKAGE(AceSmartSoft PATHS $ENV{SMART_ROOT_ACE}/modules)

# these are the regular includes (add your own includes, if needed)
INCLUDE_DIRECTORIES(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public:

//variables, ports, handlers
//param, state, wiring is dealt with the single master
Smart::IEventClientPattern<CommBasicObjects::CommKBEventParam, CommBasicObjects::CommKBEventResult, SmartACE::EventId> *kBCoordinationServicekbEventClient;
Smart::IEventClientPattern<CommBasicObjects::CommKBEventParam, CommBasicObjects::CommKBEventResult> *kBCoordinationServicekbEventClient;
KBCoordinationServiceKbEventEventHandlerCore *kBCoordinationServicekbEventEventHandlerCore;
Smart::IQueryClientPattern<CommBasicObjects::CommKBRequest, CommBasicObjects::CommKBResponse, SmartACE::QueryId> *kBCoordinationServicekbQueryClient;
Smart::IQueryClientPattern<CommBasicObjects::CommKBRequest, CommBasicObjects::CommKBResponse> *kBCoordinationServicekbQueryClient;
KBCoordinationServiceKbQueryQueryHandler *kBCoordinationServicekbQueryQueryHandler;
};
#endif /* KBCOORDINATIONSERVICE_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <cstring>
#include <cstdlib>

#include <smartNumericCorrelationId.h>

void KBCoordinationServiceCore::addNewModuleInstance(const std::string& name){
std::cout<<"addNewModuleInstance name:"<<name<<std::endl;
KBCoordinationService mi;
Expand Down Expand Up @@ -123,7 +125,7 @@ std::string KBCoordinationServiceCore::switchCi(const std::string& ciInstanceNam
if(strcasecmp(service.c_str(), "kbEvent-activate") == 0 )
{
Smart::StatusCode status;
SmartACE::EventId id;
Smart::EventIdPtr id = nullptr;
char *input = (char *)NULL;
char *pointer = (char *)NULL;
char *param1 = (char *)NULL;
Expand Down Expand Up @@ -205,7 +207,8 @@ std::string KBCoordinationServiceCore::switchCi(const std::string& ciInstanceNam
std::string str(param1);
// remove " "
str = str.substr(1, str.length()-2);
int id = atoi( param1 );
// TODO: <alex> this seems to be quite a hack, as ID is not always an int and will not work with other middlewares as ACE
Smart::EventIdPtr id = std::make_shared<Smart::NumericCorrelationId>(atoi( param1 ));

status = iter->second.kBCoordinationServicekbEventClient->deactivate(id);
outString.str("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#include <cstdio>
#include <iostream>

KBCoordinationServiceKbEventEventHandlerCore::KBCoordinationServiceKbEventEventHandlerCore(Smart::IEventClientPattern<CommBasicObjects::CommKBEventParam, CommBasicObjects::CommKBEventResult, SmartACE::EventId> *client, std::string ciInstanceName)
: Smart::IEventHandler<CommBasicObjects::CommKBEventResult,SmartACE::EventId>(client)
KBCoordinationServiceKbEventEventHandlerCore::KBCoordinationServiceKbEventEventHandlerCore(Smart::IEventClientPattern<CommBasicObjects::CommKBEventParam, CommBasicObjects::CommKBEventResult> *client, std::string ciInstanceName)
: Smart::IEventHandler<CommBasicObjects::CommKBEventResult>(client)
{
this->ciInstanceName = ciInstanceName;
}

void KBCoordinationServiceKbEventEventHandlerCore::handleEvent(const SmartACE::EventId &id, const CommBasicObjects::CommKBEventResult &r) {
void KBCoordinationServiceKbEventEventHandlerCore::handleEvent(const Smart::EventIdPtr &id, const CommBasicObjects::CommKBEventResult &r) {
std::cout<<"Event CORE Called!"<<std::endl;
std::string resultString;
resultString = userHandler.handleEvent(r);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include "CommBasicObjects/CommKBEventParam.hh"
#include "KBCoordinationServiceKbEventEventHandler.hh"

class KBCoordinationServiceKbEventEventHandlerCore : public Smart::IEventHandler<CommBasicObjects::CommKBEventResult, SmartACE::EventId>
class KBCoordinationServiceKbEventEventHandlerCore : public Smart::IEventHandler<CommBasicObjects::CommKBEventResult>
{
public:
KBCoordinationServiceKbEventEventHandlerCore(Smart::IEventClientPattern<CommBasicObjects::CommKBEventParam, CommBasicObjects::CommKBEventResult, SmartACE::EventId> *client, std::string moduleInstanceName);
virtual void handleEvent(const SmartACE::EventId &id, const CommBasicObjects::CommKBEventResult &r) override;
KBCoordinationServiceKbEventEventHandlerCore(Smart::IEventClientPattern<CommBasicObjects::CommKBEventParam, CommBasicObjects::CommKBEventResult> *client, std::string moduleInstanceName);
virtual void handleEvent(const Smart::EventIdPtr &id, const CommBasicObjects::CommKBEventResult &r) override;
CommBasicObjects::CommKBEventParam activateEventParam(const std::string& parameterString);
private:
KBCoordinationServiceKbEventEventHandler userHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PROJECT(LaserFromRGBDCoordinationService)

# find SmartSoft package
#FIND_SMARTSOFT(3.0)
FIND_PACKAGE(AceSmartSoft PATHS $ENV{SMART_ROOT_ACE}/build)
FIND_PACKAGE(AceSmartSoft PATHS $ENV{SMART_ROOT_ACE}/modules)

# these are the regular includes (add your own includes, if needed)
INCLUDE_DIRECTORIES(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <cstring>
#include <cstdlib>

#include <smartNumericCorrelationId.h>

void LaserFromRGBDCoordinationServiceCore::addNewModuleInstance(const std::string& name){
std::cout<<"addNewModuleInstance name:"<<name<<std::endl;
LaserFromRGBDCoordinationService mi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PROJECT(VisualizationCoordinationService)

# find SmartSoft package
#FIND_SMARTSOFT(3.0)
FIND_PACKAGE(AceSmartSoft PATHS $ENV{SMART_ROOT_ACE}/build)
FIND_PACKAGE(AceSmartSoft PATHS $ENV{SMART_ROOT_ACE}/modules)

# these are the regular includes (add your own includes, if needed)
INCLUDE_DIRECTORIES(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <cstring>
#include <cstdlib>

#include <smartNumericCorrelationId.h>

void VisualizationCoordinationServiceCore::addNewModuleInstance(const std::string& name){
std::cout<<"addNewModuleInstance name:"<<name<<std::endl;
VisualizationCoordinationService mi;
Expand Down
2 changes: 1 addition & 1 deletion CommBasicObjects/coordination/src-gen/info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
// running the code generator.
//--------------------------------------------------------------------------

// Generated with SmartMDSD Toolchain Version 3.9.0.201904101330
// Generated with SmartMDSD Toolchain Version 3.11.0.201911291144
9 changes: 6 additions & 3 deletions CommBasicObjects/model/CommBasicObjects.domainModelsDatasheet
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
DomainModelsDatasheet CommBasicObjects {
baseURI : "http://www.servicerobotik-ulm.de"
shortDescription: "The generic domain models shared by many other domains"
license : spdx ( "LGPL-3.0-or-later" )
BaseURI "http://www.servicerobotik-ulm.de"
ShortDescription "The generic domain models shared by many other domains"
DatasheetProperty SpdxLicense {
value "LGPL-3.0-or-later"
semanticID "https://spdx.org/licenses/LGPL-3.0-or-later.html"
}
}
41 changes: 41 additions & 0 deletions CommBasicObjects/opcua-backend/src-gen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

PROJECT("CommBasicObjectsOpcUa" VERSION 1.0)

FIND_PACKAGE(Open62541Cpp QUIET)
SET(SmartSoft_CD_API_DIR $ENV{SMART_ROOT_ACE}/modules)
FIND_PACKAGE(SeRoNetSDK QUIET)

IF(SeRoNetSDK_FOUND)
SET(CMAKE_CXX_STANDARD 14)

FILE(GLOB OPCUA_SRCS ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}/*.cc)
FILE(GLOB OPCUA_HDRS ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}/*.hh)

ADD_LIBRARY(${PROJECT_NAME} SHARED ${OPCUA_SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} CommBasicObjects SeRoNetSDK::SeRoNetSDK)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)

ADD_DEPENDENCIES(autoinstall ${PROJECT_NAME})

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake DESTINATION modules)

IF(DEFINED ${PROJECT_NAME}_VERSION)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_VERSION_MAJOR})
INCLUDE(CMakePackageConfigHelpers)
write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake COMPATIBILITY SameMajorVersion)
IF(EXISTS ${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake)
INSTALL(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake DESTINATION modules)
SMART_TRACE_GENERATED_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake)
ENDIF(EXISTS ${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake)
ENDIF(DEFINED ${PROJECT_NAME}_VERSION)

INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets DESTINATION lib)
EXPORT(EXPORT ${PROJECT_NAME}Targets)
INSTALL(EXPORT ${PROJECT_NAME}Targets DESTINATION modules)
INSTALL(FILES ${OPCUA_HDRS} DESTINATION include/${PROJECT_NAME})
ENDIF(SeRoNetSDK_FOUND)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include "CommBasePoseOpcUa.hh"

#define SERONET_NO_DEPRECATED
#include <SeRoNetSDK/SeRoNet/CommunicationObjects/Description/ComplexType.hpp>
#include <SeRoNetSDK/SeRoNet/CommunicationObjects/Description/ElementPrimitives.hpp>
#include <SeRoNetSDK/SeRoNet/CommunicationObjects/Description/SelfDescriptionArray.hpp>
#include <SeRoNetSDK/SeRoNet/CommunicationObjects/Description/ElementArray.hpp>

#include "CommBasicObjectsOpcUa/CommPose3dOpcUa.hh"
#include "CommBasicObjectsOpcUa/CommTimeStampOpcUa.hh"

namespace SeRoNet {
namespace CommunicationObjects {
namespace Description {

// serialization for CommBasicObjectsIDL::CommBasePose
template <>
IDescription::shp_t SelfDescription(CommBasicObjectsIDL::CommBasePose *obj, std::string name)
{
auto ret = std::make_shared<SeRoNet::CommunicationObjects::Description::ComplexType>(name);
// add covInvalid
ret->add(
SelfDescription(&(obj->covInvalid), "CovInvalid")
);
// add covMatrix
ret->add(
SelfDescription(&(obj->covMatrix), "CovMatrix")
);
// add updateCount
ret->add(
SelfDescription(&(obj->updateCount), "UpdateCount")
);
// add pose3D
ret->add(
SelfDescription(&(obj->pose3D), "Pose3D")
);
// add timeStamp
ret->add(
SelfDescription(&(obj->timeStamp), "TimeStamp")
);
return ret;
} // end SelfDescription

} // end namespace Description
} // end namespace CommunicationObjects
} // end namespace SeRoNet
Loading

0 comments on commit 767a35f

Please sign in to comment.