![]() |
Dynamixel
2.9.5
RoadNarrows Robotics Dynamixel Package
|
Load recording from file. More...
Public Member Functions | |
| DynaShellCmdLoadRecording () | |
| Default constructor. | |
| virtual | ~DynaShellCmdLoadRecording () |
| Default destructor. | |
| virtual void | Exec (DynaShell &shell, int argc, char *argv[]) |
| Execute load recording. More... | |
| virtual char * | TabCompletion (DynaShell &shell, const char *sText, size_t uTextLen, int nState, const char *sContext) |
| Command tab completion generator. More... | |
Public Member Functions inherited from DynaShellCmd | |
| DynaShellCmd (int nArgCntMin=0, int nArgCntMax=0) | |
| Default constructor. | |
| virtual | ~DynaShellCmd () |
| Default destructor. | |
| const char * | GetCmdName () |
| Get dynamixel shell command name. More... | |
| const char * | GetCmdHelpBrief () |
| Get shell command name brief description. More... | |
| virtual void | PrintHelp (int indent=0, int width=80) |
| Print command help with the description aligned at the given indentation. More... | |
| int | GetPublishedLevel () const |
| const char * | GetPublishedName () const |
| int | SetPublishedInfo (int nLevel, const char *sParent=NULL) |
| virtual bool | ChkArgCnt (DynaShell &shell, int argc) |
| Check that the argument count is within the class (min,max). More... | |
| bool | ChkArgCnt0 (DynaShell &shell, int argc) |
| Check that the argument count is zero. More... | |
| bool | ChkArgCntEQ (DynaShell &shell, int argc, int eq) |
| Check that the argument count is equal to the required. More... | |
| bool | ChkArgCntGE (DynaShell &shell, int argc, int min) |
| Check argument count against minimum required. More... | |
| bool | ChkArgCntLE (DynaShell &shell, int argc, int max) |
| Check argument count against maximum allowed. More... | |
| bool | ChkComm (DynaShell &shell) |
| Check that Dynamixel communication exists and is open. More... | |
| bool | ChkChain (DynaShell &shell) |
| Check that the servo chain exists. More... | |
| bool | ChkChainNotEmpty (DynaShell &shell) |
| Check that the servo chain exists and is not empty. More... | |
| bool | ChkChainHasServo (DynaShell &shell, int nServoId) |
| Check that the given servo is present in the chain. More... | |
| bool | ChkChainIsMasterServo (DynaShell &shell, int nServoId) |
| Check that the given servo is a master. More... | |
| bool | ToInt (DynaShell &shell, const char *sArg, int *pVal) |
| Convert command argument to integer. More... | |
| bool | ToUInt (DynaShell &shell, const char *sArg, uint_t *pVal) |
| Convert command argument to unsigned integer. More... | |
| bool | ToDouble (DynaShell &shell, const char *sArg, double *pVal) |
| Convert command argument to double. More... | |
| bool | ToBool (DynaShell &shell, const char *sArg, bool *pVal) |
| Convert command argument to boolean. More... | |
Protected Member Functions | |
| void | Load (DynaShell &shell) |
| Load recording. More... | |
| int | ParseServoList (DynaShell &shell) |
| Parse servo list and save in working recording. More... | |
| int | ParseRecordedData (DynaShell &shell) |
| Parse recorded data and save in working recording. More... | |
| void | SetDateField (DynaShell &shell, const char *sDate) |
| Set date value. More... | |
| int | ParseIntField (DynaShell &shell, const char *sWord, int *pFieldVal) |
| Parse integer field. More... | |
| char * | GetFirstWord () |
| Get the first word in line buffer. More... | |
| char * | GetNextWord () |
| Get the next word in line buffer. More... | |
| char * | GetEolPhrase () |
| Get the end-of-line phrase. More... | |
| bool | LineHasNoData () |
| Test if line is all white space or a comment. More... | |
| bool | GetLine () |
| Read the next line of data. More... | |
| int | Init (DynaShell &shell, char *sFileName) |
| Initialize data prior to file loading. More... | |
| void | Cleanup (DynaShell &shell) |
| Clean up data after to file loading parsing. More... | |
Protected Member Functions inherited from DynaShellCmd | |
| virtual void | PrintSynopses (int indent, int width) |
| Print synsopses. More... | |
| virtual void | PrintBlock (int col, int indent, int width, const char *sText) |
| Print a block of indented text of width. More... | |
| virtual void | PrintDelim (int width, const char cDelim) |
| char * | eow (const char *s) |
| Find end of word. More... | |
Protected Attributes | |
| FILE * | m_fp |
| open file pointer | |
| char * | m_sFileName |
| file name | |
| int | m_nLineNum |
| line number | |
| int | m_nColNum |
| column number in line | |
| char * | m_sCursor |
| current line parse cursor | |
| char * | m_sField |
| current field being parsed | |
| char * | m_buf |
| input buffer | |
| size_t | m_sizeBuf |
| size of input buffer | |
| int | m_nNumServos |
| NUM_SERVOS value. | |
| int | m_nNumRecords |
| NUM_RECORDS value. | |
| int | m_nSamplePeriod |
| SAMPLE_PERIOD value. | |
| char * | m_sDate |
| DATE value. | |
| DynaRecording * | m_pRecording |
| working and new recording | |
Protected Attributes inherited from DynaShellCmd | |
| const char * | m_sCmdName |
| command name | |
| const char * | m_sCmdHelpBrief |
| command help brief | |
| const char * | m_sCmdHelpArgs |
| command help arguments | |
| const char * | m_sCmdHelpDesc |
| command help description | |
| const int | m_nArgCntMin |
| minimum argument count | |
| const int | m_nArgCntMax |
| maximum argument count (0 if not max) | |
| int | m_nPubLevel |
| command's published level (depth) | |
| char * | m_sPubName |
| command's published name | |
Load recording from file.
Definition at line 413 of file dynashell_cmd_train.cxx.
|
inlineprotected |
Clean up data after to file loading parsing.
| shell | Dynamixel shell. |
Definition at line 1076 of file dynashell_cmd_train.cxx.
|
inlinevirtual |
Execute load recording.
| shell | Dynamixel shell. |
| argc | Command argument count. |
| argv | Array of arguments. |
Implements DynaShellCmd.
Definition at line 456 of file dynashell_cmd_train.cxx.
|
inlineprotected |
Get the end-of-line phrase.
The eol phrase is defined as a set of characters bracketed by non-white space characters.
Definition at line 954 of file dynashell_cmd_train.cxx.
|
inlineprotected |
Get the first word in line buffer.
A word is defined as characters separated by white space.
Definition at line 893 of file dynashell_cmd_train.cxx.
|
inlineprotected |
Read the next line of data.
Definition at line 1026 of file dynashell_cmd_train.cxx.
|
inlineprotected |
Get the next word in line buffer.
A word is defined as characters separated by white space.
Definition at line 910 of file dynashell_cmd_train.cxx.
|
inlineprotected |
Initialize data prior to file loading.
| shell | Dynamixel shell. |
| sFileName | File to open. |
Definition at line 1048 of file dynashell_cmd_train.cxx.
References DYNA_ECODE_BADF, DYNA_OK, DynaShell::Error(), and newstr().
|
inlineprotected |
Test if line is all white space or a comment.
Definition at line 1003 of file dynashell_cmd_train.cxx.
|
inlineprotected |
Load recording.
| shell | Dynamixel shell. |
Definition at line 517 of file dynashell_cmd_train.cxx.
References DYNA_ECODE_PARSE, DYNA_ID_NUMOF, DYNA_OK, DynaShell::Error(), DynaRecording::GetDate(), DynaRecording::GetNumOfRecords(), DynaRecording::GetNumOfServosInRecording(), DynaRecording::GetSamplePeriod(), DynaShell::m_pRecording, DynaRecording::MaxRecords, DynaShell::RecordingReplace(), DynaShell::Response(), DynaRecording::SetSamplePeriod(), and DynaShell::Warning().
|
inlineprotected |
Parse integer field.
String field can be specified in hexidecimal, decimal, or octal.
| shell | Dynamixel shell. | |
| sWord | Word to parse. | |
| [out] | pFieldVal | Converted value. |
Definition at line 864 of file dynashell_cmd_train.cxx.
References DYNA_ECODE_PARSE, DYNA_OK, and DynaShell::Error().
|
inlineprotected |
Parse recorded data and save in working recording.
| shell | Dynamixel shell. |
Definition at line 735 of file dynashell_cmd_train.cxx.
References DynaRecording::AddFieldTuple(), DynaRecording::AddRecord(), DYNA_ECODE_PARSE, DYNA_ID_NONE, DYNA_OK, DynaRecording::END, DynaShell::Error(), DynaRecording::GetServoId(), and DynaRecording::MaxRecords.
|
inlineprotected |
Parse servo list and save in working recording.
| shell | Dynamixel shell. |
Definition at line 687 of file dynashell_cmd_train.cxx.
References DYNA_ECODE_PARSE, DYNA_ID_MAX, DYNA_ID_MIN, DYNA_OK, DynaShell::Error(), and DynaRecording::RegisterServoInfo().
|
inlineprotected |
Set date value.
| shell | Dynamixel shell. |
| sDate | Date string. |
Definition at line 839 of file dynashell_cmd_train.cxx.
References newstr(), and DynaRecording::SetDate().
|
inlinevirtual |
Command tab completion generator.
Completes <file>
| shell | Dynamixel shell. |
| sText | Partial text string to complete. |
| uTextLen | Length of text. |
| nState | Generator state. If FIRST, then initialize any statics. |
| sContext | Generator context (i.e. canonical command path). |
Reimplemented from DynaShellCmd.
Definition at line 487 of file dynashell_cmd_train.cxx.
References ReadLine::FileCompletionGenerator().