-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement yarp::dev::IRemoteVariables
- Loading branch information
1 parent
a0a5a3e
commit 0a8137c
Showing
3 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
libraries/YarpPlugins/YarpOpenraveControlboard/IRemoteVariablesImpl.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- | ||
|
||
#include "YarpOpenraveControlboard.hpp" | ||
|
||
#include <limits> | ||
|
||
#include <ColorDebug.h> | ||
|
||
// ------------------- IRemoteVariables Related ------------------------------------ | ||
|
||
bool roboticslab::YarpOpenraveControlboard::getRemoteVariable(std::string key, yarp::os::Bottle& val) | ||
{ | ||
CD_DEBUG("%s\n", key.c_str()); | ||
|
||
val.clear(); | ||
|
||
if (key == "ptModeMs") | ||
{ | ||
val.addDouble(std::numeric_limits<double>::max()); | ||
} | ||
|
||
return true; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
|
||
bool roboticslab::YarpOpenraveControlboard::setRemoteVariable(std::string key, const yarp::os::Bottle& val) | ||
{ | ||
CD_DEBUG("%s\n", key.c_str()); | ||
return true; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- | ||
|
||
bool roboticslab::YarpOpenraveControlboard::getRemoteVariablesList(yarp::os::Bottle* listOfKeys) | ||
{ | ||
CD_DEBUG("\n"); | ||
listOfKeys->clear(); | ||
listOfKeys->addString("ptModeMs"); | ||
return true; | ||
} | ||
|
||
// ----------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters