Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR changes how the
CRTProtocol::Connect
works, instead of directly failing when there is a version discrepancy. It continues by usingCRTProtocol::SetVersion
with older versions of the RTProtocol. If all of listed versions failCRTProtocol::Connect
returns false as before.This enables us to test and use new versions of the RTProtocol before the next QTM is released, while at the same time providing working default values for new users.
Notice: This also means that if the user specifies a certain version, it might not end up as the version used. The user would have to call
CRTProtocol::GetVersion
to identify which version has been selected.Background
Packet.h
contains the definitions for the default RTProtocol version to be used as default values inCRTProtocol::Connect
.If QTM does not support the version, or the connection is rejected,
CRTProtocol::Connect
will then fail by returning false.We change these number to signal new changes of the RTProtocol itself. That is, the communication between QTM and the Qualisys Cpp SDK. This version normally lags behind until we released the next version of QTM. The lagging behind is what we are trying to address in this PR.
Change
RTVersion
which provides a rudimentary abstraction for the RTProtocol version pair.RTVersion::VersionList
Which takes the desired protocol version as an input, and produces a list of supported versions.CRTProtocol::Connect
which, if enabled, will fall-back to older versions of the protocol ifSetVersion
is declined by QTM.bNegotiateVersion
(default true) toCRTProtocol::Connect
which can be used to disable the fallback behaviour.