Ejemplo n.º 1
0
/**
 * Force the output buffer to be written to the port.
 * 
 * This is used when SetWriteBufferMode() is set to kFlushWhenFull to force a
 * flush before the buffer is full.
 */
void SerialPort::Flush()
{
	if (!m_consoleModeEnabled)
	{
		ViStatus status = viFlush(m_portHandle, VI_WRITE_BUF);
		wpi_assertCleanStatus(status);
	}
}
Ejemplo n.º 2
0
/**
 * Force the output buffer to be written to the port.
 * 
 * This is used when SetWriteBufferMode() is set to kFlushWhenFull to force a
 * flush before the buffer is full.
 */
void SerialPort::Flush()
{
    if (!m_consoleModeEnabled)
    {
        ViStatus localStatus = viFlush(m_portHandle, VI_WRITE_BUF);
        wpi_setError(localStatus);
    }
}
Ejemplo n.º 3
0
int anyErr(ViSession *pvi)
{

  ViStatus err;
  static char buf[1024]={0};
  int err_no;
  int err_cnt = 0;
  err=viPrintf(*pvi, "SYSTEM:ERR?\n");


  err=viScanf (*pvi, "%d%t", &err_no, &buf);


  if(err_no >0){
	++err_cnt;
  }

  err=viFlush(*pvi, VI_READ_BUF);
  err=viFlush(*pvi, VI_WRITE_BUF);
  viPrintf(*pvi, "*rst\n");
  return err_cnt;

}
Ejemplo n.º 4
0
void serialFlush(uint8_t port, int32_t *status) {
	*status = viFlush(m_portHandle[port], VI_WRITE_BUF);
	if(*status > 0)
		*status = 0;
}
Ejemplo n.º 5
0
void HAL_FlushSerial(int32_t port, int32_t* status) {
  *status = viFlush(m_portHandle[port], VI_WRITE_BUF);
  if (*status > 0) *status = 0;
}
Ejemplo n.º 6
0
/**
 * Force the output buffer to be written to the port.
 * 
 * This is used when SetWriteBufferMode() is set to kFlushWhenFull to force a
 * flush before the buffer is full.
 */
void SerialPort::Flush()
{
    ViStatus status = viFlush(m_portHandle, VI_WRITE_BUF);
    wpi_assertCleanStatus(status);
}