Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Conversation

@clero
Copy link
Contributor

@clero clero commented Apr 20, 2015

Delegate remote command parsing

ParameterMgr had many responsibilities. For example, it was in charge of
the remote commands' parsing.
This group of patch is reworking the command parsing handling. The parsing is
now handled by a dedicated class. It avoids to load remote commands parsing structure
if the tuning mode is not allowed.
As test-platform was doing the same work for its commands, a dedicated class has also been
created for it.

@clero
Copy link
Contributor Author

clero commented Apr 20, 2015

should be rebased on #94
replace #54

@dawagner please review

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 70.16% when pulling d0df2ce on clero:command_parser into 4f6171c on 01org:next.

Copy link
Contributor

Choose a reason for hiding this comment

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

further enhancement: only instantiate it if/when the remote interface is needed (e.g. don't create it if TuningAllowed=false).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

clero added 3 commits June 17, 2015 08:47
ParameterMgr is offered as template parser to the
RemoteCommandHandlerTemplate class. This is not his
primary job and make the class hard to read.
This patch introduces the CommandParser class which
handle this job.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Signed-off-by: Jules Clero <julesx.clero@intel.com>
This typedef is already defined in RemoteCommandHandlerTemplate class.
As we include its header, we can use it directly.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
@clero clero force-pushed the command_parser branch 2 times, most recently from 9dba49b to f8ac041 Compare June 17, 2015 10:00
Copy link
Contributor

Choose a reason for hiding this comment

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

See clero@8ad588b#commitcomment-11721629

(+ coding style: add a space after if)

clero added 9 commits June 17, 2015 15:15
Remote commands was organised through a vector and browsed
many times.
This patch introduces the use of a map to use only one command
structure and to enhance browsing.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Parsing data for remote command are always loaded even
when the tuning is not allowed.
This patch optimizes the memory handling by avoiding the
command parser's load when the tuning is not allowed.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
There is no need of using a pointer.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
As RemoteCommandHandlerTemplate has been almost completely
rewritten, the entire file has been commented and modified
to follow new coding style rules.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Some headers in TestPlatorm implementation was present but unused, this
patch removes them.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Signed-off-by: Jules Clero <julesx.clero@intel.com>
RemoteCommandHandler was using old style function pointer to
keep commands. This patch introduces the use of function object.
The help command is now handled as any other commands thanks to
partial function definition.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Previous name was not clear as the help of a command can be
many thing.
This patch renames it 'argument description' as it describe exactly
what we are waiting.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Signed-off-by: Jules Clero <julesx.clero@intel.com>
Signed-off-by: Jules Clero <julesx.clero@intel.com>
dawagner added a commit that referenced this pull request Jun 17, 2015
Delegate remote command parsing

ParameterMgr had many responsibilities. For example, it was in charge of
the remote commands' parsing.

This group of patch is reworking the command parsing handling. The parsing is
now handled by a dedicated class. It avoids to load remote commands parsing structure
if the tuning mode is not allowed.

As test-platform was doing the same work for its commands, a dedicated class has also been
created for it.
@dawagner dawagner merged commit 66dda39 into intel:next Jun 17, 2015
@clero clero deleted the command_parser branch June 17, 2015 16:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants