[BRLTTY] Using brlapi simultaneous read and write

Siju Samuel sijusamueltech at gmail.com
Tue Dec 17 11:08:56 EST 2013


Hi Samuel,

I have used a loop for the non-blocking read in a thread  at interval (300
millisec) and writing simultaneously.  It worked. But it consumes a  lot of
CPU.   So I noticed  the following (See REFERENCE below).     With the file
descriptor returned in BRLTTY-windows  (which is an attribute in the
brlapi_handle_t) is it possible to do some thing similar in WIndows.
Basically I am looking for a call back implementation in Windows. Any
suggestion is helpful.  Basically I am looking for any alternate to  the
equivalent of " (brlapi_readKey(1, &key)" call.

Thanks,  Siju Samuel


REFERENCE INFORMATION

http://mielke.cc/brltty/doc/BrlAPIref/group__brlapi__keys.html

Else, you'll probably want to use the file descriptor returned by
*brlapi_openConnection()*<http://mielke.cc/brltty/doc/BrlAPIref/group__brlapi__connection.html#gacd26dc42640bdad09a389be10b9e3618>in
your "big polling loop". For instance:

   - in a select() loop, just add it to the readfds and exceptfds file
   descriptor sets;
   - in a gtk or atspi application, use g_io_add_watch(fileDescriptor,
   G_IO_IN|G_IO_ERR|G_IO_HUP, f, data) for adding a callback called f;
   - in an Xt/Xaw/motif-based application, use XtAppAddInput(app_context,
   fileDescriptor, XtInputReadMask|XtInputExceptMask, f, data)
   - etc.

and then, when you detect inbound trafic on the file descriptor, do
something like this:

while (brlapi_readKey(0, &code) { // process keycode code // ... }


On Sat, Dec 14, 2013 at 12:10 PM, Samuel Thibault <
samuel.thibault at ens-lyon.org> wrote:

> Siju Samuel, le Sat 14 Dec 2013 07:10:20 -0600, a écrit :
> > Can I expect this will be fixed  soon.
>
> When I get time, which is somehow undefined.
>
> > Also a related question; is this specific to the driver  (device) or
> >  common code.
>
> It is common code.
>
> > As a resolution, is it good to perform non-bocking read at specific
> intervals.
> > So that read and write can be performed.
>
> That might help indeed.
>
> Samuel
> _______________________________________________
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY at mielke.cc
> For general information, go to: http://mielke.cc/mailman/listinfo/brltty
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mielke.cc/pipermail/brltty/attachments/20131217/ea992baf/attachment.html>


More information about the BRLTTY mailing list