Moxa-technologies INTELLIO C218 Uživatelský manuál Strana 63

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 93
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 62
Serial Programming Tools
Intellio C218Turbo /PCI User's Manual 4-9
Syntax for SCO UNIX/XENIX
#define MTCDTR 0x404
#define TurnON 1
#define TurnOFF 0
ioctl(moxa_fd, MTCDTR, TurnON);
ioctl(moxa_fd, MTCDTR, TurnOFF);
Syntax for UNIX SVR4
#include <sys/stropts.h>
#include <sys/sysmacros.h>
#define MTCDTR 0x404
#define TurnON 1
#define TurnOFF 0
struct strioctl ioc;
int setting;
setting = TurnON /* or TurnOFF */;
ioc.ic_cmd = MTCDTR;
ioc.ic_timout = 0;
ioc.ic_len = sizeof(int);
ioc.ic_dp = (char *)&setting;
ioctl(moxa_fd, I_STR, &ioc);
5. MLOWATER
Sometimes the application software may not be able to write any further data to
the output buffer because of the output buffer being full. The application has to
wait until the output buffer has 'enough space' again. The criteria to tell if the
output buffer has 'enough space' is whether the output buffer reached its 'low
water' level. That is the output buffer will accept further data only when the 'low
water' level is reached.
If the 'low water' value is relatively small, you may find that the output buffer
become empty before you write another block of data (this is quite possible
because UNIX is time-sharing multitasking environment). This will result in
discontinuous data transmission. In a timeout-sensitive application, e.g.
facsimile (FAX) transmission, discontinuous data may falter the operation.
The default 'low water' is 512 bytes. You can enlarge it but better not exceed one
half of the output buffer. Each port's output buffer is 8K bytes.
Zobrazit stránku 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 92 93

Komentáře k této Příručce

Žádné komentáře