Added dc_getStatus() to send info to ISMAS

This commit is contained in:
Gerhard Hoffmann 2023-04-18 15:06:57 +02:00
parent b7d8fabfd0
commit d992ee3fad

View File

@ -169,6 +169,22 @@ bool hwapi::dc_openSerial(int BaudNr, QString BaudStr,
return false;
}
QStringList hwapi::dc_getStatus() const {
QStringList status;
if (m_sharedMem) {
SharedMemBuffer const *shMem = SharedMemBuffer::getDataConst();
status += QString("comport : %1").arg(shMem->rs.comportName);
status += QString("baudrate : %1").arg(shMem->rs.baudNr);
status += QString("baudNr : %1").arg(shMem->rs.baudStr);
status += QString("connect : %1").arg(shMem->rs.connect);
status += QString("port open: %1").arg(shMem->rs.portIsOpen);
// to be continued
}
return status;
}
bool hwapi::dc_closeSerial(void) const {
epi_closeSerial();
for (int i = 0; i < 10; ++i) {