/** * Write raw bytes to the buffer. * * @param buffer Pointer to the buffer to read the bytes from. * @param count The maximum number of bytes to write. * @return The number of bytes actually written into the port. */ UINT32 SerialPort::Write(const char *buffer, INT32 count) { UINT32 retCount = 0; ViStatus status = viBufWrite(m_portHandle, (ViPBuf) buffer, count, (ViPUInt32) & retCount); wpi_assertCleanStatus(status); return retCount; }
/** * Write raw bytes to the buffer. * * @param buffer Pointer to the buffer to read the bytes from. * @param count The maximum number of bytes to write. * @return The number of bytes actually written into the port. */ UINT32 SerialPort::Write(const char *buffer, INT32 count) { UINT32 retCount = 0; if (!m_consoleModeEnabled) { ViStatus localStatus = viBufWrite(m_portHandle, (ViPBuf)buffer, count, (ViPUInt32)&retCount); wpi_setError(localStatus); } return retCount; }