man brlapi_raw (Fonctions bibliothèques) - Raw Mode mechanism.

NAME

Raw Mode - Raw Mode mechanism.

Functions

int brlapi_getRaw (const char *driver)

int brlapi_leaveRaw (void)

ssize_t brlapi_sendRaw (const void *buf, size_t size)

ssize_t brlapi_recvRaw (void *buf, size_t size)

Detailed Description

If the application wants to directly talk to the braille terminal, it should use Raw Mode. In this special mode, the driver gives the whole control of the terminal to it: brltty doesn't work any more.

For this, it simply has to call brlapi_getRaw(), then brlapi_sendRaw() and brlapi_recvRaw(), and finally give control back thanks to brlapi_leaveRaw().

Special care of the terminal should be taken, since one might completely trash the terminal's data, or even lock it! The application should always check for terminal's type thanks to brlapi_getDriverId().

Function Documentation

int brlapi_getRaw (const char * driver)

Switch to Raw mode

Parameters: driver Specifies the name of the driver for which the raw communication will be established.

Returns: 0 on success, -1 on error

int brlapi_leaveRaw (void)

Leave Raw mode

Returns: 0 on success, -1 on error

ssize_t brlapi_recvRaw (void * buf, size_t size)

Get a Raw packet

Parameters: buf points on a buffer where the function will store the received packet;

size holds the buffer size.

Returns: its size, -1 on error, or -2 on EOF

ssize_t brlapi_sendRaw (const void * buf, size_t size)

Send a Raw Packet

Parameters: buf points on the packet;

size holds the packet size.

Returns: size on success, -1 on error

CETTE PAGE DOCUMENTE AUSSI :