AURobotServers  4
Public Member Functions | Private Attributes | List of all members
USickData Class Reference

#include <usickdata.h>

Inheritance diagram for USickData:
Inheritance graph

Public Member Functions

unsigned char * getData ()
 
bool getDataTo (ULaserData *dest)
 
unsigned char * getFirstVal ()
 
UTime getTime ()
 
int getUnit ()
 
int getValueCount ()
 
bool isValid ()
 
void setTime (double secAgo)
 
void setValid (bool value)
 
 USickData ()
 
 ~USickData ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 

Private Attributes

unsigned char data [MAX_MSG_LNG]
 
pthread_mutex_t mLock
 
UTime scanTime
 
bool valid
 

Detailed Description

Data scan from SICK

Author
Christian Andersen

Constructor & Destructor Documentation

USickData::USickData ( )

Constructor

References ULock::lockInit(), and valid.

USickData::~USickData ( )

Destructor

Member Function Documentation

unsigned char* USickData::getData ( )
inline

Get pointer to data

References data.

Referenced by USick::receiveData().

bool USickData::getDataTo ( ULaserData dest)
unsigned char* USickData::getFirstVal ( )
inline

Get first data value in buffer

References data.

Referenced by getDataTo().

UTime USickData::getTime ( )
inline

Get cantime

References scanTime.

int USickData::getUnit ( )
inline

Get measurement unit 0 = cm, 1 = mm, 2 = 10cm

References data.

Referenced by getDataTo().

int USickData::getValueCount ( )
inline

Get measurement count

References data.

Referenced by getDataTo().

bool USickData::isValid ( )
inline

Get data valid flag

References valid.

Referenced by USick::getNewestLocked().

void USickData::setTime ( double  secAgo)
inline

Set time to Now() for this message

References getDataTo(), UTime::Now(), and scanTime.

Referenced by USick::receiveData().

void USickData::setValid ( bool  value)
inline

Set data content to be valid or invalid

References valid.

Referenced by USick::receiveData().

Member Data Documentation

unsigned char USickData::data[MAX_MSG_LNG]
private

Scan data

Referenced by getData(), getFirstVal(), getUnit(), and getValueCount().

pthread_mutex_t USickData::mLock
private

lock, when reading or writing

UTime USickData::scanTime
private

Detection time for scan

Referenced by getDataTo(), getTime(), and setTime().

bool USickData::valid
private

Valid data (CRC checked and found OK

Referenced by getDataTo(), isValid(), setValid(), and USickData().


The documentation for this class was generated from the following files: