Migrates GenericFtsImpl to plain members and FtReplyState
This commit is contained in:
1 parent
f974625b0f
commit
6794412c29
1 file changed
+13
-6
@@ -61,10 +61,14 @@ private:
|
||||
void sendReplyState(Core::FtReplyState replyState, const rti::core::SampleIdentity &requestSampleIdentity)
|
||||
{
|
||||
connext::WriteSample<ReplyTopic> reply;
|
||||
reply.data().replyState(replyState);
|
||||
// rtiddsgen -stl generates plain public data members, so the reply
|
||||
// state is assigned directly instead of the old setter call.
|
||||
reply.data().replyState = replyState;
|
||||
|
||||
bool bLastTelegram = ((replyState != Core::FtReplyState_def::InProgress) &&
|
||||
(replyState != Core::FtReplyState_def::NotStarted));
|
||||
// FtReplyState_def doesn't exist anymore with rtiddsgen 7.7 - the
|
||||
// enum values are directly available in Core::FtReplyState.
|
||||
bool bLastTelegram = ((replyState != Core::FtReplyState::InProgress) &&
|
||||
(replyState != Core::FtReplyState::NotStarted));
|
||||
m_replier->send_reply(reply, requestSampleIdentity, bLastTelegram);
|
||||
}
|
||||
|
||||
@@ -77,7 +81,7 @@ private:
|
||||
template <typename T, typename std::enable_if<HasStatusFunction<T>::value, int>::type = 0>
|
||||
void setReply(T &data, Core::FtReplyState status)
|
||||
{
|
||||
data.replyState(status);
|
||||
data.replyState = status;
|
||||
}
|
||||
|
||||
template <typename T, typename std::enable_if<!HasStatusFunction<T>::value, int>::type = 0>
|
||||
@@ -233,8 +237,11 @@ protected:
|
||||
<< "[s], -> age: " << age
|
||||
<< "[s], data: " << s;
|
||||
ReplyTopic rt;
|
||||
rt.errorString(tr_lts("dds", "Topic %1 was outdated and therefore ignored. Does the client time match the server time?"));
|
||||
rt.errorParams({TopicNameHelper::requestTopicName()});
|
||||
// Generated topic types have plain public data members, so the
|
||||
// error information is assigned directly instead of the old
|
||||
// setter calls.
|
||||
rt.errorString = tr_lts("dds", "Topic %1 was outdated and therefore ignored. Does the client time match the server time?");
|
||||
rt.errorParams = {TopicNameHelper::requestTopicName()};
|
||||
sendReply(request.identity(), rt);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user