[BRLTTY] Integrating LibLouise to brltty ( Writing and Reading)

Siju Samuel sijusamueltech at gmail.com
Thu Aug 15 19:01:46 EDT 2013


HI,

This is to get  an initial direction on integrating brltty to Liblouise.

I. Integrating LibLouise to brltty.
---------------------------------------------
   I could write a simple program for displaying a text to braille device
(simulated)  using brlapi with the following calls.  Now to integrate with
liblouise  ( for  contracted braille and foreign languages) what is the
extra calls or change in the steps to be made. Any high level direction
would be very helpful. Which api needs to call in B.4 below?


A. Steps to Write to Braille display
1.brlapi_openConnection(NULL, NULL)
2.brlapi_enterTtyMode(BRLAPI_TTY_DEFAULT, NULL)
3.brlapi_writeText(0, "He can read.")
4.brlapi_closeConnection();


B. Steps to Write to Braile diplay - with liblouis.  ( Is this correct?)
1.brlapi_openConnection(NULL, NULL)
2.brlapi_enterTtyMode(BRLAPI_TTY_DEFAULT, NULL)
3. lou_translatestring()
[This function takes a string of 16-bit Unicode characters in inbuf and
translates it into a string of 16-bit characters in outbuf. Each 16-bit
character produces a particular dot pattern in one braille cell when sent
to an embosser or braille display or to a screen type font. Which 16-bit
character represents which dot pattern is indicated by the
character-definition and display opcodes in the translation table]

4.. Which brailApi to call to write to the device...????
5.brlapi_closeConnection();


II. Reading from device and converting to string.

In the context of using libluoise,  after "reading brlapi_readKey(1, &key)"
which output a single char.

After reading a string from this (till encounter spaces  or enter  ) , can
the
the output from it  be directly used in lou_backTranslateString()  as input?

[lou_backTranslateString]
This is exactly the opposite of lou_translateString. inbuf is a string of
16-bit Unicode characters representing braille. outbuf will contain a
string of 16–bit Unicode characters. typeform will indicate any emphasis
found in the input string, while spacing will indicate any differences in
spacing between the input and output strings. The typeform and spacing
parameters may be NULL if this information is not needed. mode again
specifies how the back-translation should be done.

Thanks,
Siju samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mielke.cc/pipermail/brltty/attachments/20130815/69e2a945/attachment.html>


More information about the BRLTTY mailing list