On Wed, 12 May 2010, Chen Kedem wrote:

Hi Chen,

> What is the different between this and the functions we have in
> contrib/hbtpathy?

hbtpathy supports only small subset of hbcom functionality, i.e.
such important things like hardware/software flow control or DTR/RTS
flags cannot be controlled by user in hbtpathy.
After verification of the new HBCOM code probably we can quite easy
tune and extend HBTPATHY code by replacing its current low level code
with HBCOM.

> >    OS2 builds:
> >         - discard card is not supported
> Is this the character to place when erroneous data is received?

No. It's character which can be used to erase recive buffer by remote
station.

> I don't have original OS/2 headers, but in my (VERY) old OS/2 program
> I had this working:
> 
> typedef struct
> {
>     WORD        write_tmo  ;    /* Write timeout in 10 ms ( 0 - 10, 1 - 20 ) 
> */
>     WORD        read_tmo   ;    /* Read  timeout in 10 ms ( 0 - 10, 1 - 20 ) 
> */
>     BYTE        flag1      ;
>     BYTE        flag2      ;
>     BYTE        flag3      ;
>     BYTE        err_rep    ;
>     BYTE        brk_rep    ;
>     BYTE        xon_char   ;
>     BYTE        xoff_char  ;
> } DCBINFO ;
> 
> DCBINFO dcb      ;      /* Device control block information */
> 
>             /* ... after port is opened */
> 
>             if ( !(nErr = DOSDEVIOCTL ((BYTE far*) &dcb, NULL, 0x73, 1, 
> pSio->shandle)))
>             {
>                 dcb.read_tmo  = zcom_readtmo  ; /* 10 ms  */
>                 dcb.write_tmo = zcom_writetmo ; /* 10 ms  */
>                 dcb.flag1     = 0   ;
>                 dcb.flag2     = 4|8 ;        /* Error repl | 0-stripp   */
>                 dcb.flag3     = 2   ;        /* Timeout proceccing bits */
>                 dcb.err_rep   = 'X';        /* Error replace char */
>                 dcb.brk_rep   = 0  ;        /* Break replace char */
>                 if ( !(nErr = DOSDEVIOCTL (NULL, (BYTE far*) &dcb, 0x53, 1, 
> pSio->shandle)))
>                {
>                     /* set baud and other staff ... */
> 
>                }
>             }

Thank you very much.
Current hbcom code already uses DCBINFO in OS2 builds to set different
hardware and software flow controls, error char, break char, XON/XOFF
chars, read/write timeouts, etc.
Anyhow I do not find in OS2 API documentation anything what can be used
to simulate remote erase char functionality.
It can be emulated by us inside read code by simple reading data to our
own buffer and then looking for erase char but it creates additional
overhead so I do not want to make it if it's not strictly necessary for
users. Anyhow such implementation also adds support for <lNoDelete>
parameter in COM_READ() (see the ChangeLog) so maybe I'll add it in the
future though in such case I'll try to move this part of code to CTCOM
to not introduce such hacks to general HBCOM library.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to