fix the fastrtps version problem in case of v1.10.0

This commit is contained in:
stmoon 2020-07-15 23:27:42 +09:00 committed by Nuno Marques
parent d0c74712b5
commit 4418179a92
2 changed files with 4 additions and 4 deletions

View File

@ -90,12 +90,12 @@ bool @(topic)_Publisher::init()
{
// Create RTPSParticipant
ParticipantAttributes PParam;
@[if version.parse(fastrtps_version[:3]) < version.parse('2.0')]@
@[if version.parse(fastrtps_version) < version.parse('2.0')]@
PParam.rtps.builtin.domainId = 0;
@[else]@
PParam.domainId = 0;
@[end if]@
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
@[if version.parse(fastrtps_version) <= version.parse('1.8')]@
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
@[else]@
PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;

View File

@ -90,12 +90,12 @@ bool @(topic)_Subscriber::init(uint8_t topic_ID, std::condition_variable* t_send
// Create RTPSParticipant
ParticipantAttributes PParam;
@[if version.parse(fastrtps_version[:3]) < version.parse('2.0')]@
@[if version.parse(fastrtps_version) < version.parse('2.0')]@
PParam.rtps.builtin.domainId = 0;
@[else]@
PParam.domainId = 0;
@[end if]@
@[if version.parse(fastrtps_version[:3]) <= version.parse('1.8')]@
@[if version.parse(fastrtps_version) <= version.parse('1.8')]@
PParam.rtps.builtin.leaseDuration = c_TimeInfinite;
@[else]@
PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;