Skip to content
Snippets Groups Projects
Commit 3561d3f0 authored by Olivier Stasse's avatar Olivier Stasse Committed by olivier stasse
Browse files

[device] cmdDisplay

parent b3f59bb5
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,7 @@ namespace dynamicgraph {
public: /* --- DISPLAY --- */
virtual void display(std::ostream& os) const;
virtual void cmdDisplay();
SOT_CORE_EXPORT friend std::ostream&
operator<<(std::ostream& os,const Device& r) {
r.display(os); return os;
......
......@@ -174,6 +174,16 @@ Device( const std::string& n )
(*this,&Device::setSecondOrderIntegration,
docstring));
/* Display information */
docstring =
"\n"
" Display information on device \n"
"\n";
addCommand
("display",
command::makeCommandVoid0
(*this,&Device::cmdDisplay,docstring));
/* SET of control input type. */
docstring =
"\n"
......@@ -597,3 +607,10 @@ void Device::display ( std::ostream& os ) const
<< "sanityCheck: " << sanityCheck_<< endl
<< "controlInputType:" << controlInputType_ << endl;
}
void Device::cmdDisplay ( )
{
std::cout << name <<": "<<state_<<endl
<< "sanityCheck: " << sanityCheck_<< endl
<< "controlInputType:" << controlInputType_ << endl;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment