DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Qt worker which performs actual serial communication hardware operations in a separate thread in order not to interfer with processor time used to update the user interface. All functions are inherently thead-safe since they are only called by the worker thread the respective instance of this class lives in. More...
Public Slots | |
void | Open () |
Opens the communication connection. More... | |
void | Close () |
Closes the communication connection. More... | |
void | Reset () |
Resets the worker and the communication connection. More... | |
void | Clear () |
Clears the communication connection's buffers and state. More... | |
void | Flush () |
Flushes the communication connection's buffers. More... | |
void | Read () |
Reads from the communication connection's hardware interface. More... | |
void | Write (const QString String) |
Writes String to the communication connection's hardware interface. More... | |
void | Write_endl () |
Writes end of the line character(s) to the communication connection's hardware interface. More... | |
Public Member Functions | |
QSerialCommunicationHardwareAdapterWorker ()=default | |
virtual | ~QSerialCommunicationHardwareAdapterWorker ()=0 |
Public Member Functions inherited from Util::QWorker | |
void | MoveToWorkerThread (DynExp::ItemIDType ID) |
Moves the instance to DynExpCore's worker thread. Do not call from constructor since derived classes have not been instantiated yet in that case. This would prevent QObjects contained in derived classes to be also moved to the worker thread. More... | |
auto | GetOwner () const noexcept |
Returns this worker instance's owner. More... | |
Protected Member Functions | |
void | SetCommunicationChannelOpened () const noexcept |
Calls QSerialCommunicationHardwareAdapter::SetCommunicationChannelOpened on QWorker::Owner. Does nothing if QWorker::Owner is nullptr. More... | |
void | SetCommunicationChannelClosed () const noexcept |
Calls QSerialCommunicationHardwareAdapter::SetCommunicationChannelClosed on QWorker::Owner. Does nothing if QWorker::Owner is nullptr. More... | |
void | DataRead (const std::string &String) const |
Calls QSerialCommunicationHardwareAdapter::DataRead on QWorker::Owner. Does nothing if QWorker::Owner is nullptr. More... | |
template<typename ExceptionType > | |
void | SetException (const ExceptionType &Exception) const |
Calls QSerialCommunicationHardwareAdapter::SetException on QWorker::Owner. Does nothing if QWorker::Owner is nullptr. More... | |
Protected Member Functions inherited from Util::QWorker | |
QWorker ()=default | |
~QWorker ()=default | |
Private Member Functions | |
virtual void | OpenChild ()=0 |
Opens the communication connection. More... | |
virtual void | CloseChild ()=0 |
Closes the communication connection. More... | |
virtual void | ResetChild ()=0 |
Resets the worker and the communication connection. More... | |
virtual void | ClearChild ()=0 |
Clears the communication connection's buffers and state. More... | |
virtual void | FlushChild ()=0 |
Flushes the communication connection's buffers. More... | |
virtual void | ReadChild ()=0 |
Reads from the communication connection's hardware interface. More... | |
virtual void | WriteChild (const QString &String)=0 |
Writes String to the communication connection's hardware interface. More... | |
virtual void | Write_endl_Child ()=0 |
Writes end of the line character(s) to the communication connection's hardware interface. More... | |
Qt worker which performs actual serial communication hardware operations in a separate thread in order not to interfer with processor time used to update the user interface. All functions are inherently thead-safe since they are only called by the worker thread the respective instance of this class lives in.
Definition at line 563 of file HardwareAdapter.h.
|
default |
|
pure virtual |
Definition at line 353 of file HardwareAdapter.cpp.
|
inlineslot |
Clears the communication connection's buffers and state.
Definition at line 575 of file HardwareAdapter.h.
|
privatepure virtual |
Clears the communication connection's buffers and state.
Implemented in DynExp::HardwareAdapterSerialPortWorker, and DynExp::HardwareAdapterTcpSocketWorker.
|
inlineslot |
Closes the communication connection.
Definition at line 573 of file HardwareAdapter.h.
|
privatepure virtual |
Closes the communication connection.
Implemented in DynExp::HardwareAdapterSerialPortWorker, and DynExp::HardwareAdapterTcpSocketWorker.
|
protected |
Calls QSerialCommunicationHardwareAdapter::DataRead on QWorker::Owner. Does nothing if QWorker::Owner is nullptr.
Definition at line 375 of file HardwareAdapter.cpp.
|
inlineslot |
Flushes the communication connection's buffers.
Definition at line 576 of file HardwareAdapter.h.
|
privatepure virtual |
Flushes the communication connection's buffers.
Implemented in DynExp::HardwareAdapterSerialPortWorker, and DynExp::HardwareAdapterTcpSocketWorker.
|
inlineslot |
Opens the communication connection.
Definition at line 572 of file HardwareAdapter.h.
|
privatepure virtual |
Opens the communication connection.
Implemented in DynExp::HardwareAdapterSerialPortWorker, and DynExp::HardwareAdapterTcpSocketWorker.
|
inlineslot |
Reads from the communication connection's hardware interface.
Definition at line 577 of file HardwareAdapter.h.
|
privatepure virtual |
Reads from the communication connection's hardware interface.
Implemented in DynExp::HardwareAdapterSerialPortWorker, and DynExp::HardwareAdapterTcpSocketWorker.
|
inlineslot |
Resets the worker and the communication connection.
Definition at line 574 of file HardwareAdapter.h.
|
privatepure virtual |
Resets the worker and the communication connection.
Implemented in DynExp::HardwareAdapterSerialPortWorker, and DynExp::HardwareAdapterTcpSocketWorker.
|
protectednoexcept |
Calls QSerialCommunicationHardwareAdapter::SetCommunicationChannelClosed on QWorker::Owner. Does nothing if QWorker::Owner is nullptr.
Definition at line 366 of file HardwareAdapter.cpp.
|
protectednoexcept |
Calls QSerialCommunicationHardwareAdapter::SetCommunicationChannelOpened on QWorker::Owner. Does nothing if QWorker::Owner is nullptr.
Definition at line 357 of file HardwareAdapter.cpp.
|
protected |
Calls QSerialCommunicationHardwareAdapter::SetException on QWorker::Owner. Does nothing if QWorker::Owner is nullptr.
ExceptionType | Type of the exception to be stored |
Exception | Exception to be stores |
Definition at line 786 of file HardwareAdapter.h.
|
inlineslot |
Writes String
to the communication connection's hardware interface.
Definition at line 578 of file HardwareAdapter.h.
|
inlineslot |
Writes end of the line character(s) to the communication connection's hardware interface.
Definition at line 579 of file HardwareAdapter.h.
|
privatepure virtual |
Writes end of the line character(s) to the communication connection's hardware interface.
Implemented in DynExp::HardwareAdapterSerialPortWorker, and DynExp::HardwareAdapterTcpSocketWorker.
|
privatepure virtual |
Writes String
to the communication connection's hardware interface.
Implemented in DynExp::HardwareAdapterSerialPortWorker, and DynExp::HardwareAdapterTcpSocketWorker.