EasyManua.ls Logo

Datasat AP25 - Page 170

Datasat AP25
170 pages
Print Icon
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AP25 Installation and Operating Guide Version 1.00
Appendix H. Serial Command AP! H-14 Document #: 9301H79500 Ver. 1.00
int count=0;
for( int i=0; i<RX_BUF_SIZE; i++ )
{
// read 1-by-1.
int ret = read(fd, &c, 1);
if ( ret < 0 )
{
printf( "Count=%d, Error\n", count );
close(fd);
fd = -1;
}
if (ret == 1)
{
// add to buffer
rxBuf[count++] = c;
if( c == '\r' ) // End of response
{
rxBuf[count] = 0;
printf( "%s\n", rxBuf );
break;
}
}
}
return 0;
}
/* ======================================================================== **
* # # # End of Ap20NetCmd.cpp # # #
* ======================================================================== */

Table of Contents

Related product manuals