Skip to content

HW Monitor - Terminal Parser API - #6623

Merged
ev-mp merged 5 commits into
realsenseai:developmentfrom
remibettan:terminal-parser-only-add-to-api
Jun 17, 2020
Merged

HW Monitor - Terminal Parser API#6623
ev-mp merged 5 commits into
realsenseai:developmentfrom
remibettan:terminal-parser-only-add-to-api

Conversation

@remibettan

Copy link
Copy Markdown
Contributor

Adding terminal parser capability to API.
Auto complete not implemented here.
Triggered by jira ticket: DSO-14959

Comment thread common/parser.hpp Outdated
Comment thread src/CMakeLists.txt Outdated
Comment thread src/CMakeLists.txt Outdated
Comment thread src/rs.cpp
Comment thread src/rs.cpp

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

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

Comment thread src/terminal-parser.cpp Outdated
Comment thread src/terminal-parser.h Outdated
Comment thread src/terminal-parser.h
Comment thread src/terminal-parser.h Outdated
@ev-mp ev-mp changed the title Terminal parser only add to api HW Monitor - Terminal Parser API Jun 17, 2020
Comment thread examples/capture/rs-capture.cpp Outdated
#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API
#include "example.hpp" // Include short list of convenience functions for rendering

#include <fstream>

Copy link
Copy Markdown
Contributor

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

Comment thread src/rs.cpp Outdated
{
VALIDATE_NOT_NULL(terminal_parser);
VALIDATE_NOT_NULL(command);
VALIDATE_LE(size_of_command, 1000);

Copy link
Copy Markdown
Contributor

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

@remibettan
remibettan force-pushed the terminal-parser-only-add-to-api branch from b7a8172 to 70829bc Compare June 17, 2020 13:11

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bytes, correct?

Comment thread 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

Copy link
Copy Markdown
Contributor

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

@remibettan
remibettan force-pushed the terminal-parser-only-add-to-api branch from bed1cc8 to 1937c3c Compare June 17, 2020 14:18

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ev-mp
ev-mp merged commit 082da49 into realsenseai:development Jun 17, 2020
@remibettan
remibettan deleted the terminal-parser-only-add-to-api branch March 15, 2021 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants