![Datasat AP25 Installation And Operating Manual Download Page 170](http://html2.mh-extra.com/html/datasat/ap25/ap25_installation-and-operating-manual_3699599170.webp)
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 # # #
* ======================================================================== */