50 #include <sys/select.h> 59 #include "rnr/rnrconfig.h" 92 "Dynamixel simple shell.",
95 "The %P provides a simple command-line shell to the Dynamixel interface " 96 "provided by the library libDynamixel.",
117 "(Proxied) serial device interface. Syntax:\n" 118 " [botsense://[hostname][:port]]/device",
131 "Serial interface baudrate.",
144 "Shell script filename.",
157 "Trace shell scripts.",
170 "Silence non-error responses.",
195 Argv0 = basename(argv[0]);
207 OptsInvalid(
Argv0,
"Failed to create interface on %s@%d.",
227 else if( (fp = fopen(
OptsScript,
"r")) == NULL )
256 shell.
PublishMap(
"bg",
"Commands to control the vServo background thread.");
257 shell.
PublishMap(
"clear",
"Commands to clear run-time state.");
258 shell.
PublishMap(
"dump",
"Dump memory contents.");
259 shell.
PublishMap(
"get",
"Commands to get servo class object parameters.");
260 shell.
PublishMap(
"load",
"Commands to load files.");
261 shell.
PublishMap(
"read",
"Commands to read from the physical servos.");
262 shell.
PublishMap(
"run",
"Commands to run scripts.");
263 shell.
PublishMap(
"save",
"Commands to save files.");
264 shell.
PublishMap(
"set",
"Commands to set servo class object parameters.");
265 shell.
PublishMap(
"write",
"Commands to write to the physical servos.");
291 int main(
int argc,
char *argv[])
static bool OptsXTrace
trace script
void PublishShellServoCommands(DynaShell &shell)
Publish shell servo commands to shell.
virtual void RegisterChainAgent(DynaChain *pChain)
Register the Dynamixel chain for control and monitoring.
#define DYNA_OK
not an error, success
void PublishShellInterfaceCommands(DynaShell &shell)
Publish shell dynamixel interface commands to shell.
Dynamixel shell utilities.
DynaComm * m_pDynaComm
dynamixel bus communication
void ScriptPush(const char *sScriptFile, FILE *fp)
Push new script on the stack.
static void MainInit(DynaShell &shell, int argc, char *argv[])
Main initialization.
void PublishMap(const char *sParent, const string &strBrief)
Publish new command map to shell.
int main(int argc, char *argv[])
Example main.
static bool OptsSilent
silence output
static char * OptsScript
script file
static OptsPgmInfo_T AppPgmInfo
Program information.
void PublishShellCoreCommands(DynaShell &shell)
Publish shell core commands to shell.
static DynaComm * New(const char *sUri, int nBaudRate)
Archetype constructor to create a new Dynamixel bus communication derived instance.
bool m_bIsInteractive
[not] user interactive
bool m_bXTrace
do [not] trace script
static const PkgInfo_T PkgInfo
static int OptsBaudRate
serial baudrate
static void MainInitArgs(DynaShell &shell, int argc, char *argv[])
Main command-line argument initialization.
static char * OptsSerDevUri
the serial device URI
Dynamixel Chain Container Base Class.
Package version information.
DynaBgThread * m_pDynaBgThread
dynamixel chain
static OptsInfo_T AppOptsInfo[]
Command line options information.
bool m_bSilent
do [not] silence non-error responses
RoadNarrows Dynamixel Top-Level Package Header File.
The dynashell Command Class Interface.
static char * Argv0
the command
static void MainFini(DynaShell &shell)
Main clean-up on exiting.
DynaChain * m_pDynaChain
dynamixel chain
int Run()
Command execution loop.
The simple dynashell declarations.