EV3 remote access. More...
#include <stdlib.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <limits.h>
#include <dirent.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <arpa/inet.h>
#include "ev3_link.h"
#include "../ev3_both.h"
Data Structures | |
struct | EV3_MESSAGE_HEADER |
Header of an UDP message. More... | |
struct | EV3_MULTI_WRITE_SUBHEADER |
Sub-header for EV3_MULTI_WRITE. More... | |
struct | EV3_MESSAGE |
UDP message. More... | |
Typedefs | |
typedef struct EV3_MESSAGE_HEADER * | PEV3_MESSAGE_HEADER |
typedef struct EV3_MULTI_WRITE_SUBHEADER * | PEV3_MULTI_WRITE_SUBHEADER |
typedef struct EV3_MESSAGE * | PEV3_MESSAGE |
Enumerations | |
enum | { EV3_IDLE = 0, EV3_WRITE_FILE = 1, EV3_RESULT_WRITE = 2, EV3_READ_FILE = 3, EV3_DATA_READ = 4, EV3_LIST_DIR = 5, EV3_DIRECTORY = 6, EV3_POWEROFF = 7, EV3_COMPLETION = 8, EV3_WELCOME = 9, EV3_READ_KEYS = 10, EV3_KEYS = 11, EV3_MULTI_WRITE = 12 } |
Functions | |
int | udp_ev3_open (char *addr, uint16_t port) |
Open an UDP socket. More... | |
int | udp_ev3_close (void) |
Close an UDP socket. More... | |
int | udp_ev3_write (char *fn, void *data, int sz) |
Write data into the specified file over UDP. More... | |
int | udp_ev3_multi_write (uint8_t *sn, uint16_t pos, char *fn, void *data, int sz) |
Write data into the group of specified files over UDP. More... | |
int | udp_ev3_read (char *fn, void *buf, int sz) |
Read data from the specified file over UDP. More... | |
int | udp_ev3_read_keys (uint8_t *buf) |
Read state of EV3 brick keys over UDP. More... | |
int | udp_ev3_listdir (char *fn, void *buf, int sz) |
List files in the specified directory over UDP. More... | |
int | udp_ev3_catch_address (void) |
Check for a beacon from the EV3 brick. More... | |
int | udp_ev3_poweroff (void) |
Power-off the EV3 brick. More... | |
EV3 remote access.