---
name: "brlapi_getDriverId"
section: "3"
platform: "linux"
package: "libbrlapi1-dev"
version: "3.7.2-7.1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/brlapi_info"
---

# brlapi\_getDriverId(3)

How to get information about the connected Terminal.

Part of [brlapi\_info(3)](/brlapi_info/3.md).

## NAME

Getting Terminal information - How to get information about the connected Terminal.

### Functions

int **brlapi\_getDriverId** (char \*id, size\_t n)\
 int **brlapi\_getDriverName** (char \*name, size\_t n)\
 int **brlapi\_getDisplaySize** (unsigned int \*x, unsigned int \*y)\

## Detailed Description

Before using Raw mode or key codes, the application should always check the type of the connected terminal, to be sure it is really the one it expects.

One should also check for display size, so as to adjust further displaying on it.

## Function Documentation

### int brlapi\_getDisplaySize (unsigned int \* x, unsigned int \* y)

Return the size of the braille display

### int brlapi\_getDriverId (char \* id, size\_t n)

Identify the driver used by *brltty*

This function will fill its argument with the *brltty* 2-chars code of the driver currently in use, to which it adds a '\\0'.

**Parameters:**

*id* is the buffer given by the application; \
 *n* is the maximum size of the id buffer.

**Returns:**

\-1 on error, or a positive value giving the size of the needed buffer, if the supplied one is to small (same as snprintf()).

### int brlapi\_getDriverName (char \* name, size\_t n)

Return the complete name of the driver used by *brltty*

This function fills its argument with the whole name of the braille terminal if available, terminated with a '\\0'.

**Parameters:**

*name* is the buffer given by the application; \
 *n* is the maximum size for the name buffer.

**Returns:**

\-1 on error, or a positive value giving the size of the needed buffer, if the supplied one is to small (same as snprintf()).
