40 void Init(std::shared_ptr<SerialPortHandler> a_SerialPortHandler);
56 bool IsLocked()
const {
return (m_bLockedBySelf || m_bLockedByOthers); }
76 std::shared_ptr<SerialPortHandler> m_SerialPortHandler;
78 bool m_bLockedByOthers;
79 bool m_bLastLockedBySelf;
80 bool m_bLastLockedByOthers;
83 #endif // LOCK_GUARD_H
~LockGuard()
The destructor of LockGuard objects.
bool IsLockedByOthers() const
Query whether the serial device is currently "locked" by at least one other AccessClient entity...
bool IsLockedBySelf() const
Query whether the serial device is currently "locked" by the responsible AccessClient entity...
bool UpdateSerialPortState(size_t a_LockHolders)
Update the effective lock state of the related serial port.
void Init(std::shared_ptr< SerialPortHandler > a_SerialPortHandler)
Initializer method to register subsequent objects.
LockGuard()
The constructor of LockGuard objects.
bool IsLocked() const
Query the lock state of the related serial device.
void AcquireLock()
Method to aquire a lock.
void ReleaseLock()
Method to release a lock.