Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef __JAUS_CORE_SENSOR__H
00041 #define __JAUS_CORE_SENSOR__H
00042
00043 #include "jaus/core/control/accesscontrol.h"
00044
00045 namespace JAUS
00046 {
00072 class JAUS_CORE_DLL Sensor
00073 {
00074 public:
00075 Sensor() {}
00076 virtual ~Sensor() {}
00077
00078 void SynchronizeToComponent(const Address& componentID) { Mutex::ScopedLock lock(&mSensorSyncMutex); mSyncComponentID = componentID; }
00079 bool IsSynchronizing() const { Mutex::ScopedLock lock(&mSensorSyncMutex); return mSyncComponentID.IsValid(); }
00080 Address GetSynchronizeID() const { Mutex::ScopedLock lock(&mSensorSyncMutex); return mSyncComponentID; }
00081
00082 virtual void CheckServiceSynchronization(const unsigned int timeSinceLastCheckMs) = 0;
00083 private:
00084 Mutex mSensorSyncMutex;
00085 Address mSyncComponentID;
00086 };
00087 }
00088
00089 #endif
00090