Converted cxx to cpp

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2017-07-31 09:18:45 -07:00
committed by Lorenz Meier
parent b313bfdaa9
commit 049c769293
10 changed files with 25 additions and 24 deletions
+5 -5
View File
@@ -116,12 +116,12 @@ urtps_templates_dir = msg_folder + "/templates/urtps"
uRTPS_CLIENT_TEMPL_FILE = 'microRTPS_client.cpp.template' uRTPS_CLIENT_TEMPL_FILE = 'microRTPS_client.cpp.template'
uRTPS_AGENT_TOPICS_H_TEMPL_FILE = 'RtpsTopics.h.template' uRTPS_AGENT_TOPICS_H_TEMPL_FILE = 'RtpsTopics.h.template'
uRTPS_AGENT_TOPICS_SRC_TEMPL_FILE = 'RtpsTopics.cxx.template' uRTPS_AGENT_TOPICS_SRC_TEMPL_FILE = 'RtpsTopics.cpp.template'
uRTPS_AGENT_TEMPL_FILE = 'microRTPS_agent.cxx.template' uRTPS_AGENT_TEMPL_FILE = 'microRTPS_agent.cpp.template'
uRTPS_AGENT_CMAKELIST_TEMPL_FILE = 'microRTPS_agent_CMakeLists.txt.template' uRTPS_AGENT_CMAKELIST_TEMPL_FILE = 'microRTPS_agent_CMakeLists.txt.template'
uRTPS_PUBLISHER_SRC_TEMPL_FILE = 'Publisher.cxx.template' uRTPS_PUBLISHER_SRC_TEMPL_FILE = 'Publisher.cpp.template'
uRTPS_PUBLISHER_H_TEMPL_FILE = 'Publisher.h.template' uRTPS_PUBLISHER_H_TEMPL_FILE = 'Publisher.h.template'
uRTPS_SUBSCRIBER_SRC_TEMPL_FILE = 'Subscriber.cxx.template' uRTPS_SUBSCRIBER_SRC_TEMPL_FILE = 'Subscriber.cpp.template'
uRTPS_SUBSCRIBER_H_TEMPL_FILE = 'Subscriber.h.template' uRTPS_SUBSCRIBER_H_TEMPL_FILE = 'Subscriber.h.template'
def generate_agent(out_dir): def generate_agent(out_dir):
@@ -160,7 +160,7 @@ def generate_agent(out_dir):
if ret: if ret:
raise Exception("fastrtpsgen not found. Specify the location of fastrtpsgen with the -f flag") raise Exception("fastrtpsgen not found. Specify the location of fastrtpsgen with the -f flag")
os.system("rm " + agent_out_dir + "/fastrtpsgen/*PubSubMain.cxx " os.system("rm " + agent_out_dir + "/fastrtpsgen/*PubSubMain.cpp "
+ agent_out_dir + "/fastrtpsgen/makefile* " + agent_out_dir + "/fastrtpsgen/makefile* "
+ agent_out_dir + "/fastrtpsgen/*Publisher* " + agent_out_dir + "/fastrtpsgen/*Publisher* "
+ agent_out_dir + "/fastrtpsgen/*Subscriber*") + agent_out_dir + "/fastrtpsgen/*Subscriber*")
@@ -1,6 +1,6 @@
@############################################### @###############################################
@# @#
@# EmPy template for generating RtpsTopics.cxx file @# EmPy template for generating RtpsTopics.cpp file
@# @#
@############################################### @###############################################
@# Start of Template @# Start of Template
@@ -49,6 +49,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG OR
endif() endif()
endif() endif()
file(GLOB MICRORTPS_AGENT_SOURCES *.cxx) file(GLOB MICRORTPS_AGENT_SOURCES *.cpp)
add_executable(micrortps_agent ${MICRORTPS_AGENT_SOURCES}) add_executable(micrortps_agent ${MICRORTPS_AGENT_SOURCES})
target_link_libraries(micrortps_agent fastrtps fastcdr) target_link_libraries(micrortps_agent fastrtps fastcdr)
@@ -33,10 +33,11 @@
/** /**
* @file protocol_splitter.cpp * @file protocol_splitter.cpp
* NuttX Driver to split mavlink 2 and another protocol on a serial port. * NuttX Driver to split mavlink 2 and another RTPS on a serial port.
* Makes sure the two protocols can be read & written simultanously by 2 processes. * Makes sure the two protocols can be read & written simultanously by 2 processes.
* It will create two devices: * It will create two devices:
* /dev/mavlink * /dev/mavlink
* /dev/rtps
*/ */
#include <drivers/device/device.h> #include <drivers/device/device.h>
+10 -10
View File
@@ -129,22 +129,22 @@ src/modules/micrortps_bridge/micrortps_agent
├── idl ├── idl
│   ├── sensor_baro_.idl │   ├── sensor_baro_.idl
│   └── sensor_combined_.idl │   └── sensor_combined_.idl
├── microRTPS_agent.cxx ├── microRTPS_agent.cpp
├── microRTPS_transport.cxx ├── microRTPS_transport.cpp
├── microRTPS_transport.h ├── microRTPS_transport.h
├── RtpsTopics.cxx ├── RtpsTopics.cpp
├── RtpsTopics.h ├── RtpsTopics.h
├── sensor_baro_.cxx ├── sensor_baro_.cpp
├── sensor_baro_.h ├── sensor_baro_.h
├── sensor_baro_Publisher.cxx ├── sensor_baro_Publisher.cpp
├── sensor_baro_Publisher.h ├── sensor_baro_Publisher.h
├── sensor_baro_PubSubTypes.cxx ├── sensor_baro_PubSubTypes.cpp
├── sensor_baro_PubSubTypes.h ├── sensor_baro_PubSubTypes.h
├── sensor_combined_.cxx ├── sensor_combined_.cpp
├── sensor_combined_.h ├── sensor_combined_.h
├── sensor_combined_PubSubTypes.cxx ├── sensor_combined_PubSubTypes.cpp
├── sensor_combined_PubSubTypes.h ├── sensor_combined_PubSubTypes.h
├── sensor_combined_Subscriber.cxx ├── sensor_combined_Subscriber.cpp
└── sensor_combined_Subscriber.h └── sensor_combined_Subscriber.h
2 directories, 20 files 2 directories, 20 files
``` ```
@@ -154,7 +154,7 @@ $ tree src/modules/micrortps_bridge/micrortps_client
src/modules/micrortps_bridge/micrortps_client src/modules/micrortps_bridge/micrortps_client
├── CMakeLists.txt ├── CMakeLists.txt
├── microRTPS_client.cpp ├── microRTPS_client.cpp
├── microRTPS_transport.cxx ├── microRTPS_transport.cpp
└── microRTPS_transport.h └── microRTPS_transport.h
0 directories, 4 files 0 directories, 4 files
``` ```
@@ -49,17 +49,17 @@ if(NOT GENERATE_RTPS_BRIDGE MATCHES "off")
endforeach() endforeach()
foreach(topic ${config_rtps_send_topics}) foreach(topic ${config_rtps_send_topics})
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Publisher.cxx) list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Publisher.cpp)
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Publisher.h) list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Publisher.h)
endforeach() endforeach()
foreach(topic ${config_rtps_receive_topics}) foreach(topic ${config_rtps_receive_topics})
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Subscriber.cxx) list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Subscriber.cpp)
list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Subscriber.h) list(APPEND topic_bridge_files_out ${msg_out_path}/${topic}_Subscriber.h)
endforeach() endforeach()
if (NOT "${config_rtps_send_topics}" STREQUAL "" OR NOT "${config_rtps_receive_topics}" STREQUAL "") if (NOT "${config_rtps_send_topics}" STREQUAL "" OR NOT "${config_rtps_receive_topics}" STREQUAL "")
set(topic_bridge_files_out microRTPS_client.cpp microRTPS_transport.cxx microRTPS_transport.h) set(topic_bridge_files_out microRTPS_client.cpp microRTPS_transport.cpp microRTPS_transport.h)
set(send_topic_files_opt) set(send_topic_files_opt)
if (NOT "${send_topic_files}" STREQUAL "") if (NOT "${send_topic_files}" STREQUAL "")
@@ -93,7 +93,7 @@ px4_add_module(
MAIN micrortps_client MAIN micrortps_client
STACK_MAIN 4096 STACK_MAIN 4096
SRCS SRCS
microRTPS_transport.cxx microRTPS_transport.cpp
microRTPS_client.cpp microRTPS_client.cpp
DEPENDS DEPENDS
platforms__common platforms__common