.
This commit is contained in:
@@ -34,6 +34,16 @@ struct ServiceInfo {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Macro to instantiate the ServiceInfo struct.
|
||||
*/
|
||||
#define HOS_SERVICE_IMPL_INFO(ImplClass, ServiceName, ServiceMajor, ServiceMinor) \
|
||||
template<> const char* ::hos::cosgi::service::implementation::ServiceInfo<ImplClass>::name = ServiceName; \
|
||||
template<> const int ::hos::cosgi::service::implementation::ServiceInfo<ImplClass>::major = ServiceMajor; \
|
||||
template<> const int ::hos::cosgi::service::implementation::ServiceInfo<ImplClass>::minor = ServiceMinor;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of interface::Object.
|
||||
*/
|
||||
|
||||
@@ -113,7 +113,8 @@ int main(int argc, char **argv) {
|
||||
// Create and register hos-core-service
|
||||
CoreServiceImpl hosCoreService(rosPublicNodeHandle, rosPrivateNodeHandle);
|
||||
service_registration_pt reg = nullptr;
|
||||
bundleContext_registerService(context, (char*)CoreService::SERVICE_NAME, &hosCoreService, nullptr, ®);
|
||||
CoreService* coreInterface = dynamic_cast<CoreService*>(&hosCoreService);
|
||||
bundleContext_registerService(context, (char*)CoreService::SERVICE_NAME, coreInterface, nullptr, ®);
|
||||
ROS_INFO("HOS core service registered");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user