-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porting C++ Test Agent to 1.0.1-RC1 #90
Conversation
da80698
to
2312651
Compare
fc7dcdd
to
e71a74b
Compare
0a42edd
to
84cb785
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly only one thing I found... not the best guy for reviewing C++ but it all looks good from me. Feature files are looking great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7546941
to
e8ca283
Compare
e8ca283
to
5c077eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a few comments/questions.
test_agent/cpp/src/APIWrapper.cpp
Outdated
if (transportType_ == "socket") { | ||
return std::make_shared<SocketUTransport>(uri); | ||
} else { | ||
// If the transport type is neither "socket" nor "zenoh", log an error | ||
// and return null. | ||
spdlog::error("Invalid transport type: {}", transportType_); | ||
return nullptr; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
I think I'd rather see this transportType_ be some sort of enum or #define or something less likely to be mis-typed.
-
The comment mentions "socket" or "zenoh" as valid inputs, but zenoh's been removed ... Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will implement 1 and fix 2. Zenoh is added later next PR. At this time of this PR zenoh was not available
jsonData.GetAllocator()); | ||
|
||
// Create transport with the created URI | ||
transportPtr_ = createTransport(def_src_uuri_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused by this call to createTransport. Wasn't the transportPtr_ set in the constructor? And if so, is it expected/necessary to change the transportPtr_ within this method ?
6ec30be
to
0bc7e8e
Compare
test_agent/cpp/src/APIWrapper.cpp
Outdated
if (transportType_ == "socket") { | ||
return std::make_shared<SocketUTransport>(uri); | ||
} else { | ||
// If the transport type is neither "socket" nor "zenoh", log an error | ||
// and return null. | ||
spdlog::error("Invalid transport type: {}", transportType_); | ||
return nullptr; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will implement 1 and fix 2. Zenoh is added later next PR. At this time of this PR zenoh was not available
0bc7e8e
to
51414a6
Compare
This PR update c++ test agent to work with 1.6.0 core api with addition on L2 apis (closes #59 )