Commit 61cf3e4a authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[device] cmdDisplay

parent 7bc2ca88
......@@ -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;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment