|
Robot Agent
1.0
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/time.h>#include <sys/select.h>#include "openinterface.h"#include "config.h"#include "def.h"#include "general.h"Go to the source code of this file.
Functions | |
| openinterface_t * | openinterface_open (char *device_path) |
| int | openinterface_close (openinterface_t *ois) |
| int | openinterface_start (openinterface_t *ois) |
| int | openinterface_full (openinterface_t *ois) |
| int | openinterface_drive (openinterface_t *ois, int velocity, int radius) |
| int | openinterface_drive_direct (openinterface_t *ois, int right, int left) |
| int | openinterface_sensor_get (openinterface_t *ois, const unsigned char id, const unsigned char len, unsigned char *data) |
| int | openinterface_sensors_update (openinterface_t *ois, const unsigned int sensor_id, const unsigned int size) |
| int | openinterface_distance_get (openinterface_t *ois) |
| int | openinterface_angle_get (openinterface_t *ois) |
| int | openinterface_LEDs (openinterface_t *ois, int play, int advance, unsigned char power_color, unsigned char power_intensity) |
| int openinterface_angle_get | ( | openinterface_t * | ois | ) |
Get change of angle
| opis | Pointer to OpenInterface structure |
Definition at line 320 of file openinterface.c.
| int openinterface_close | ( | openinterface_t * | ois | ) |
Close OpenInterface connection
| opis | Pointer to openInterface structure |
Definition at line 63 of file openinterface.c.
| int openinterface_distance_get | ( | openinterface_t * | ois | ) |
Get travelled distance
| opis | Pointer to OpenInterface structure |
Definition at line 301 of file openinterface.c.
| int openinterface_drive | ( | openinterface_t * | ois, |
| int | velocity, | ||
| int | radius | ||
| ) |
Sends Drive Command
| opis | Pointer to OpenInterface structure |
| velocity | Drive velocity |
| radius | Radius of circle (curve) |
Definition at line 119 of file openinterface.c.
| int openinterface_drive_direct | ( | openinterface_t * | ois, |
| int | right, | ||
| int | left | ||
| ) |
Sends Direct Drive Command
| opis | Pointer to OpenInterface structure |
| right | Right wheel velocity |
| left | left wheel velocity |
Definition at line 150 of file openinterface.c.
| int openinterface_full | ( | openinterface_t * | ois | ) |
Enable full control of OpenInterface
| opis | Pointer to OpenInterface structure |
Definition at line 103 of file openinterface.c.
| int openinterface_LEDs | ( | openinterface_t * | ois, |
| int | play, | ||
| int | advance, | ||
| unsigned char | power_color, | ||
| unsigned char | power_intensity | ||
| ) |
Control LEDs
| opis | Pointer to OpenInterface structure |
| play | Light up PLAY LED (0 - off, 1 - on) |
| advance | Light up ADVANCE LED (0 - off, 1 - on) |
| power_color | Color of POWER LED (0 - green, 255 - red, intermediate values - intermediate colors) |
| power_intensity | Intensity of POWER LED (0-255) |
Definition at line 343 of file openinterface.c.
| openinterface_t* openinterface_open | ( | char * | device_path | ) |
Open OpenInterface connection
| device_path | Path to device |
Definition at line 35 of file openinterface.c.
| int openinterface_sensor_get | ( | openinterface_t * | ois, |
| const unsigned char | id, | ||
| const unsigned char | len, | ||
| unsigned char * | data | ||
| ) |
Get one sensor request readings
| opis | Pointer to OpenInterface structure |
| id | ID of the sensor packet |
| len | Number of bytes to be read |
| data | Ponter to memory where to store data |
Definition at line 182 of file openinterface.c.
| int openinterface_sensors_update | ( | openinterface_t * | ois, |
| const unsigned int | sensor_id, | ||
| const unsigned int | size | ||
| ) |
Updates all sensor data
| opis | Pointer to OpenInterface structure |
| oiss | Pointer to OpenInterface sensor structure |
| sensor_id | ID of sensor packet |
| size | Number of bytes in sensor packet |
Definition at line 231 of file openinterface.c.
| int openinterface_start | ( | openinterface_t * | ois | ) |
Start OpenInterface connection
| opis | Pointer to OpenInterface structure |
Definition at line 89 of file openinterface.c.
1.8.5