Robot Control Library
|
Go to the source code of this file.
Macros | |
#define | RC_PID_DIR "/run/shm/" |
#define | RC_PID_FILE "/run/shm/robotcontrol.pid" |
Typedefs | |
typedef enum rc_state_t | rc_state_t |
process state variable, read and modify by rc_get_state, rc_set_state, and rc_print_state. Starts as UNINITIALIZED. More... | |
Enumerations | |
enum | rc_state_t { UNINITIALIZED, RUNNING, PAUSED, EXITING } |
process state variable, read and modify by rc_get_state, rc_set_state, and rc_print_state. Starts as UNINITIALIZED. More... | |
Functions | |
rc_state_t | rc_get_state (void) |
fetches the current process state as set by the user or signal handler More... | |
void | rc_set_state (rc_state_t new_state) |
sets the current process state. More... | |
int | rc_print_state (void) |
prints the process state to stdout in human-readble form More... | |
int | rc_make_pid_file (void) |
Makes a PID file RC_PID_FILE (/run/shm/robotcontrol.pid) containing the current PID of your process. More... | |
int | rc_kill_existing_process (float timeout_s) |
This function is used to make sure any existing program using the PID file is stopped. More... | |
int | rc_remove_pid_file (void) |
Removes the PID file created by rc_make_pid_file(). More... | |
int | rc_enable_signal_handler (void) |
Enables a generic signal handler. Optional but recommended. More... | |
int | rc_disable_signal_handler (void) |
resets the system signal callbacks to defualt, generally this is never needed unless you are intentionally changing signal handlers in the middle of a program. More... | |