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_EXTRAS_RANGE_SENSOR__H
00041 #define __JAUS_EXTRAS_RANGE_SENSOR__H
00042
00043 #include "jaus/core/events/events.h"
00044 #include "jaus/extras/rangesensor/reportlocalrangescan.h"
00045 #include "jaus/extras/rangesensor/reportrangesensorconfiguration.h"
00046 #include "jaus/extras/rangesensor/querylocalrangescan.h"
00047 #include "jaus/extras/rangesensor/queryrangesensorconfiguration.h"
00048 #include <string>
00049
00050 namespace JAUS
00051 {
00060 class JAUS_EXTRAS_DLL RangeSensor : public Events::Child
00061 {
00062 public:
00063 static const std::string Name;
00064
00065 RangeSensor();
00066
00067 ~RangeSensor();
00068
00069 void AddRangeDevice(const RangeSensorConfig& configuration);
00070
00071 void SetLocalRangeScan(const Byte deviceID,
00072 const Point3D& deviceLocation,
00073 const Point3D& deviceOrientation,
00074 const std::vector<UShort>& scan,
00075 const Time& timestamp = Time());
00076
00077 void SetLocalRangeScan(const Byte deviceID,
00078 const Point3D& deviceLocation,
00079 const Point3D& deviceOrientation,
00080 const std::vector<double>& scan,
00081 const Time& timestamp = Time());
00082
00083 void SetLocalRangeScan(const Byte deviceID,
00084 const Point3D& deviceLocation,
00085 const Point3D& deviceOrientation,
00086 const Point3D::List& scan,
00087 const Time& timestamp = Time());
00088
00089 virtual bool GenerateEvent(const Events::Subscription& info) const;
00090
00091 virtual bool IsEventSupported(const Events::Type type,
00092 const double requestedPeriodicRate,
00093 const Message* queryMessage,
00094 double& confirmedPeriodicRate,
00095 std::string& errorMessage) const;
00096
00097 virtual bool IsDiscoverable() const { return true; }
00098
00099 virtual void Receive(const Message* message);
00100
00101 virtual Message* CreateMessage(const UShort messageCode) const;
00102 protected:
00103 Mutex mRangeSensorMutex;
00104 RangeSensorConfig::Map mRangeSensors;
00105 std::map<Byte, ReportLocalRangeScan> mRangeScans;
00106 };
00107 }
00108
00109 #endif
00110
00111