-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
HW Monitor - Terminal Parser API #6623
HW Monitor - Terminal Parser API #6623
Conversation
|
||
rs2_raw_data_buffer* rs2_terminal_parse_response(rs2_terminal_parser* terminal_parser, | ||
const char* command, unsigned int size_of_command, | ||
const void* response, unsigned int size_of_response, rs2_error** error) BEGIN_API_CALL |
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.
Add validation for size_of_cmd/response
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.
done - hope the numbers are ok
examples/capture/rs-capture.cpp
Outdated
@@ -3,12 +3,12 @@ | |||
|
|||
#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API | |||
#include "example.hpp" // Include short list of convenience functions for rendering | |||
|
|||
#include <fstream> |
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.
This file is not part of the PR
src/rs.cpp
Outdated
@@ -2988,6 +2988,7 @@ rs2_raw_data_buffer* rs2_terminal_parse_command(rs2_terminal_parser* terminal_pa | |||
{ | |||
VALIDATE_NOT_NULL(terminal_parser); | |||
VALIDATE_NOT_NULL(command); | |||
VALIDATE_LE(size_of_command, 1000); |
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.
Add comment for the hard-coded values - units/explanation
b7a8172
to
70829bc
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.
Couple of typos in the new code - but these seem the last onces
src/rs.cpp
Outdated
{ | ||
VALIDATE_NOT_NULL(terminal_parser); | ||
VALIDATE_NOT_NULL(command); | ||
VALIDATE_LE(size_of_command, 1000);//bufer shall be lesss than 1000 kbytes or similar |
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.
bytes, correct?
src/rs.cpp
Outdated
VALIDATE_NOT_NULL(terminal_parser); | ||
VALIDATE_NOT_NULL(command); | ||
VALIDATE_NOT_NULL(response); | ||
VALIDATE_LE(size_of_command, 1000); //bufer shall be lesss than 1000 kbytes or similar |
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.
lesss, .. bytes - appears in several places
bed1cc8
to
1937c3c
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.
LGTM
Adding terminal parser capability to API.
Auto complete not implemented here.
Triggered by jira ticket: DSO-14959