-
Notifications
You must be signed in to change notification settings - Fork 783
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into github_master
- Loading branch information
Showing
213 changed files
with
11,919 additions
and
2,284 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
# Define variables for the FastRTPS version number. | ||
# | ||
m4_define([version_major],[1]) | ||
m4_define([version_minor],[1]) | ||
m4_define([version_minor],[2]) | ||
m4_define([version_micro],[0]) | ||
|
||
AC_INIT([fastrtps], [version_major.version_minor.version_micro], [[email protected]], [eProsima FastRTPS], [http://eprosima.com/]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/********/ | ||
Internal ePRosima doc - New features in this branch | ||
/********/ | ||
|
||
--- Query the number of Publishers and Subscribers listening to a topic | ||
|
||
Participant has 2 new API functions, get_no_publishers and get_no_subscribers | ||
These functions a target_topic as argument and return the number of pubs/subs | ||
that exist on a participant that are assigned to the specified topic | ||
|
||
--- Possibility to attach a secondary ReaderListener to SimpleEDP RTPSReaders | ||
|
||
A new Participant API function, getEDPReaders, allows the user to get pointer | ||
to the two stateful readers the EDP spawns. From here it is possible to access | ||
the ReaderListener, which has been modified. | ||
|
||
The ReaderListeners used in the EDP Readers inherit from a class that allows a | ||
slave ReaderListener to be attached. This way a user can attach his own | ||
ReaderListener so that its callback is executed whenever the default EDP | ||
callback is invoked. | ||
|
||
The result of this is that there is a path from user land to the EDP | ||
RTPSReaders, then to the modified ReaderListener and from there we can | ||
attach a user defined ReaderListener with its own callbacks. | ||
|
||
--- Examples: | ||
|
||
---Attach a slave ReaderListener: | ||
- The target slave ReaderListener inherits from ReaderListener | ||
|
||
class gettopicnamesandtypesReaderListener:public ReaderListener | ||
{ | ||
public: | ||
std::mutex mapmutex; | ||
std::map<std::string,std::set<std::string>> topicNtypes; | ||
void onNewCacheChangeAdded(RTPSReader* reader, const CacheChange_t* const change_in){ | ||
CacheChange_t* change = (CacheChange_t*) change_in; | ||
if(change->kind == ALIVE){ | ||
WriterProxyData proxyData; | ||
CDRMessage_t tempMsg; | ||
tempMsg.msg_endian = change->serializedPayload.encapsulation == PL_CDR_BE ? BIGEND:LITTLEEND; | ||
tempMsg.length = change->serializedPayload.length; | ||
memcpy(tempMsg.buffer,change->serializedPayload.data,tempMsg.length); | ||
if(proxyData.readFromCDRMessage(&tempMsg)){ | ||
mapmutex.lock(); | ||
topicNtypes[proxyData.m_topicName].insert(proxyData.m_typeName); | ||
mapmutex.unlock(); | ||
} | ||
} | ||
} | ||
}; | ||
|
||
- Insertion from within application code: | ||
|
||
std::pair<StatefulReader*,StatefulReader*> EDP_Readers = my_participant->getEDPReaders(); | ||
InfectableReaderListener* target = dynamic_cast<InfectableReaderListener*>(EDP_Readers.second->getListener()); | ||
target->attachListener(slave_listener); | ||
result = target->hasReaderAttached(); | ||
ASSERT_EQ(result,true); | ||
slave_target = dynamic_cast<gettopicnamesandtypesReaderListener*>(target->getAttachedListener()); | ||
|
||
|
||
--- Poll the no of Pubs and Subs on topic "TEST_NAME" | ||
|
||
std::string my_topicName("TEST_NAME"); | ||
int no_pubs = my_participant->get_no_publishers(my_topicName.cstr()); | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bin | ||
output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
project("FlowControlExample") | ||
|
||
# Find requirements | ||
find_package(fastcdr REQUIRED) | ||
find_package(fastrtps REQUIRED) | ||
|
||
# Set C++11 | ||
include(CheckCXXCompilerFlag) | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG OR | ||
CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
check_cxx_compiler_flag(--std=c++11 SUPPORTS_CXX11) | ||
if(SUPPORTS_CXX11) | ||
add_compile_options(--std=c++11) | ||
else() | ||
message(FATAL_ERROR "Compiler doesn't support C++11") | ||
endif() | ||
endif() | ||
|
||
message(STATUS "Configuring Flow Control example...") | ||
file(GLOB FLOWCONTROL_EXAMPLE_SOURCES_CXX "*.cxx") | ||
file(GLOB FLOWCONTROL_EXAMPLE_SOURCES_CPP "*.cpp") | ||
|
||
add_executable(FlowControlExample ${FLOWCONTROL_EXAMPLE_SOURCES_CXX} ${FLOWCONTROL_EXAMPLE_SOURCES_CPP}) | ||
target_include_directories(FlowControlExample PRIVATE) | ||
target_link_libraries(FlowControlExample fastrtps fastcdr ${Boost_LIBRARIES}) | ||
install(TARGETS FlowControlExample | ||
RUNTIME DESTINATION examples/C++/FlowControlExample/${BIN_INSTALL_DIR}) |
Oops, something went wrong.