Go to the source code of this file.
Defines | |
#define | RCVBUFSIZE 32 |
#define | DEFAULTPORT 344 |
#define | NMOTOR 4 |
#define | SENDBUFFERSIZE 64 |
#define | ERRORSTRING "kmot_error" |
Functions | |
int | kmot_ipFirmware (int argc, char *argv[], void *data) |
int | kmot_ipStatus (int argc, char *argv[], void *data) |
int | kmot_ipConfigPID (int argc, char *argv[], void *data) |
int | kmot_ipSetPointSource (int argc, char *argv[], void *data) |
int | kmot_ipMeasure (int argc, char *argv[], void *data) |
int | kmot_ipResetError (int argc, char *argv[], void *data) |
int | kmot_ipSetSpeed (int argc, char *argv[], void *data) |
int | kmot_ipSetPos (int argc, char *argv[], void *data) |
int | kmot_ipInitMotor (int argc, char *argv[], void *data) |
int | main (int argc, char *argv[]) |
Variables | |
knet_dev_t * | motorList [NMOTOR] |
char | sendBuffer [SENDBUFFERSIZE] |
Definition in file kmot_ipserver.c.
#define DEFAULTPORT 344 |
#define ERRORSTRING "kmot_error" |
Definition at line 31 of file kmot_ipserver.c.
Referenced by kmot_ipConfigPID(), kmot_ipFirmware(), kmot_ipInitMotor(), kmot_ipMeasure(), kmot_ipResetError(), kmot_ipSetPointSource(), kmot_ipSetPos(), kmot_ipSetSpeed(), and kmot_ipStatus().
#define NMOTOR 4 |
Definition at line 29 of file kmot_ipserver.c.
Referenced by kmot_ipConfigPID(), kmot_ipFirmware(), kmot_ipInitMotor(), kmot_ipMeasure(), kmot_ipResetError(), kmot_ipSetPointSource(), kmot_ipSetPos(), kmot_ipSetSpeed(), and kmot_ipStatus().
#define RCVBUFSIZE 32 |
#define SENDBUFFERSIZE 64 |
Definition at line 30 of file kmot_ipserver.c.
int kmot_ipConfigPID | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Configure the motor controller PID
Syntax: "ipConfigPID requestId motor regtype Kp Kd Ki\\n"
Return: "ipConfigPID requestId\\n"
Definition at line 106 of file kmot_ipserver.c.
References ERRORSTRING, kmot_ConfigurePID(), ksock_send_answer(), motor, NMOTOR, and sendBuffer.
Referenced by main().
int kmot_ipFirmware | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Get the motor controler firmare version.
Syntax: "ipFirmware requestId motor\\n"
Return: "ipFirmware requestId version\\n"
Definition at line 43 of file kmot_ipserver.c.
References ERRORSTRING, kmot_GetFWVersion(), KMOT_REVISION, KMOT_VERSION, ksock_send_answer(), motor, NMOTOR, and sendBuffer.
Referenced by main().
int kmot_ipInitMotor | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Set default initialization for the given controller
Syntax: "ipInit requestId motor\\n"
Return: "ipInit requestId\\n"
Definition at line 296 of file kmot_ipserver.c.
References ERRORSTRING, kmot_ConfigurePID(), kmot_ResetError(), kmot_SetBlockedTime(), kmot_SetLimits(), kmot_SetMargin(), kmot_SetMode(), kmot_SetOptions(), kmot_SetSampleTime(), kmot_SetSpeedProfile(), kMotModeIdle, kMotRegCurrent, kMotRegPos, kMotRegSpeed, kMotSWOptStopMotorBlk, kMotSWOptWindup, ksock_send_answer(), motor, NMOTOR, and sendBuffer.
Referenced by main().
int kmot_ipMeasure | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Get a measure from a motor controller
Syntax: "ipMeasure requestId motor regtype\\n"
Return: "ipMeasure requestId measure\\n"
Definition at line 169 of file kmot_ipserver.c.
References ERRORSTRING, kmot_GetMeasure(), ksock_send_answer(), measure(), motor, NMOTOR, and sendBuffer.
Referenced by main().
int kmot_ipResetError | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Reset errors from a motor controller
Syntax: "ipResetError requestId motor\\n"
Return: "ipResetError requestId\\n"
Definition at line 201 of file kmot_ipserver.c.
References ERRORSTRING, kmot_ResetError(), ksock_send_answer(), motor, NMOTOR, and sendBuffer.
Referenced by main().
int kmot_ipSetPointSource | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Select the target point source for the controller
Syntax: "ipSetPointSource requestId motor regtype wavetype period amplitude offset\\n"
Return: "ipSetPointSource requestId\\n"
Definition at line 137 of file kmot_ipserver.c.
References ERRORSTRING, kmot_SetPointSource(), ksock_send_answer(), motor, NMOTOR, and sendBuffer.
Referenced by main().
int kmot_ipSetPos | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Set target position for the given motor
Syntax: "ipSetPos requestId motor position\\n"
Return: "ipSetPos requestId\\n"
Definition at line 263 of file kmot_ipserver.c.
References ERRORSTRING, kmot_SetPoint(), kMotRegPos, ksock_send_answer(), motor, NMOTOR, and sendBuffer.
Referenced by main().
int kmot_ipSetSpeed | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Set target speed for the given motor
Syntax: "ipSetSpeed requestId motor speed\\n"
Return: "ipSetSpeed requestId\\n"
Definition at line 232 of file kmot_ipserver.c.
References ERRORSTRING, kmot_SetPoint(), kMotRegSpeed, ksock_send_answer(), motor, NMOTOR, and sendBuffer.
Referenced by main().
int kmot_ipStatus | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Get the motor controler status.
Syntax: "ipStatus requestId motor\\n"
Return: "ipStatus requestId status error\\n"
Definition at line 74 of file kmot_ipserver.c.
References ERRORSTRING, kmot_GetStatus(), ksock_send_answer(), motor, NMOTOR, sendBuffer, and status().
Referenced by main().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 338 of file kmot_ipserver.c.
References buf, DEFAULTPORT, DieWithError(), kb_init(), kb_set_debug_level(), kmot_GetFWVersion(), kmot_ipConfigPID(), kmot_ipFirmware(), kmot_ipInitMotor(), kmot_ipMeasure(), kmot_ipResetError(), kmot_ipSetPointSource(), kmot_ipSetPos(), kmot_ipSetSpeed(), kmot_ipStatus(), KMOT_REVISION, KMOT_VERSION, KNET_BUS_ANY, knet_open(), ksock_add_command(), ksock_exec_command_pending(), ksock_get_command(), ksock_init(), ksock_next_connection(), ksock_server_open(), list_command(), and RCVBUFSIZE.
knet_dev_t* motorList[NMOTOR] |
Definition at line 33 of file kmot_ipserver.c.
char sendBuffer[SENDBUFFERSIZE] |
Definition at line 34 of file kmot_ipserver.c.
Referenced by kmot_ipConfigPID(), kmot_ipFirmware(), kmot_ipInitMotor(), kmot_ipMeasure(), kmot_ipResetError(), kmot_ipSetPointSource(), kmot_ipSetPos(), kmot_ipSetSpeed(), and kmot_ipStatus().