ev3duder  0.3.0
EV3 Downloader/Uploader
tunnel.c File Reference

tunnel stdio to established ev3 connection More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include "ev3_io.h"
#include "defs.h"
#include "packets.h"
#include "error.h"
#include "funcs.h"

Go to the source code of this file.

Functions

int tunnel ()
 tunnels from stdio to ev3 More...
 

Detailed Description

tunnel stdio to established ev3 connection

Author
Ahmad Fatoum
See also
rc.pl for a usage scenario

Definition in file tunnel.c.

Function Documentation

int tunnel ( )

tunnels from stdio to ev3

tunnel stdio to established ev3 connection

Return values
err_codeAn error code according to enum ERR
  • If stdio is connected to a terminal, packets can be entered in hex and submitted with a line break. non-graphical characters, including whitespace, are ignored. If the first 4 bytes can't be parsed as hex digits, they are replaced with the binary length. Any other character is replaced with a nibble rounded up.
  • If stdio is a pipe, the first 2 bytes are read to acquire packet length and then an equal amount of bytes is read and sent to the ev3

Definition at line 35 of file tunnel.c.