EasyManua.ls Logo

SystemBase Portbase-3010 - Page 107

SystemBase Portbase-3010
118 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Portbase User Guide
char readbuff[255];
// Reads data.
readval = read(porthandle, readbuff, sizeof(readbuff));
if (readval < 1) return;
readbuff[readval] = 0;
printf("%s",readbuff);
}
//Opens the ttys0 port of RTCP connected to Portbase.
void OpenSerial(void)
{
int i;
// Opens the ttys0 port.
porthandle = open(“/dev/ttys0”, O_RDWR | O_NOCTTY |O_NONBLOCK);
// Outputs an error if the socket port is not valid.
if (porthandle < 0){
printf("Can not Open %s\n", ComName);
}
}
107

Table of Contents