27 lines
485 B
C++
Executable File
27 lines
485 B
C++
Executable File
/**
|
|
* Common functions for Publisher and Subscriber
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
#pragma once
|
|
|
|
namespace DDSConnector
|
|
{
|
|
template<typename P>
|
|
void PubSubBase::updatePartitionQoS(P &pubSub)
|
|
{
|
|
if (pubSub == nullptr)
|
|
return;
|
|
|
|
auto publisherQos = pubSub.qos();
|
|
|
|
// use only selected partition
|
|
dds::core::policy::Partition partitionQos;
|
|
partitionQos.name( m_partitions );
|
|
publisherQos << partitionQos;
|
|
|
|
pubSub.qos(publisherQos);
|
|
}
|
|
} // namespace DDSConnector
|