MRPT  1.9.9
rp::hal::Locker Class Reference

Detailed Description

Definition at line 37 of file locker.h.

#include <rplidar/src/hal/locker.h>

Public Types

enum  LOCK_STATUS { LOCK_OK = 1, LOCK_TIMEOUT = -1, LOCK_FAILED = 0 }
 

Public Member Functions

 Locker ()
 
 ~Locker ()
 
Locker::LOCK_STATUS lock (unsigned long timeout=0xFFFFFFFF)
 
void unlock ()
 
HANDLE getLockHandle ()
 

Protected Member Functions

void init ()
 
void release ()
 

Protected Attributes

HANDLE _lock
 

Member Enumeration Documentation

◆ LOCK_STATUS

Enumerator
LOCK_OK 
LOCK_TIMEOUT 
LOCK_FAILED 

Definition at line 40 of file locker.h.

Constructor & Destructor Documentation

◆ Locker()

rp::hal::Locker::Locker ( )
inline

Definition at line 47 of file locker.h.

References _lock, and init().

Here is the call graph for this function:

◆ ~Locker()

rp::hal::Locker::~Locker ( )
inline

Definition at line 55 of file locker.h.

References release().

Here is the call graph for this function:

Member Function Documentation

◆ getLockHandle()

HANDLE rp::hal::Locker::getLockHandle ( )
inline

Definition at line 125 of file locker.h.

References _lock.

◆ init()

void rp::hal::Locker::init ( )
inlineprotected

Definition at line 131 of file locker.h.

References _lock, and FALSE.

Referenced by Locker().

Here is the caller graph for this function:

◆ lock()

Locker::LOCK_STATUS rp::hal::Locker::lock ( unsigned long  timeout = 0xFFFFFFFF)
inline

Definition at line 56 of file locker.h.

References _lock, LOCK_FAILED, LOCK_OK, LOCK_TIMEOUT, and mrpt::system::now().

Referenced by rp::standalone::rplidar::RPlidarDriverSerialImpl::_cacheCapsuledScanData(), rp::standalone::rplidar::RPlidarDriverSerialImpl::_cacheScanData(), and rp::hal::AutoLocker::AutoLocker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ release()

void rp::hal::Locker::release ( )
inlineprotected

Definition at line 140 of file locker.h.

References _lock, and unlock().

Referenced by ~Locker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unlock()

void rp::hal::Locker::unlock ( )
inline

Definition at line 115 of file locker.h.

References _lock.

Referenced by rp::standalone::rplidar::RPlidarDriverSerialImpl::_cacheCapsuledScanData(), rp::standalone::rplidar::RPlidarDriverSerialImpl::_cacheScanData(), rp::hal::AutoLocker::forceUnlock(), release(), and rp::hal::AutoLocker::~AutoLocker().

Here is the caller graph for this function:

Member Data Documentation

◆ _lock

HANDLE rp::hal::Locker::_lock
protected

Definition at line 153 of file locker.h.

Referenced by getLockHandle(), init(), lock(), Locker(), release(), and unlock().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019