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 00041 #ifndef __JAUS_CORE_DISCOVERY_VEHICLE__H 00042 #define __JAUS_CORE_DISCOVERY_VEHICLE__H 00043 00044 #include "jaus/core/service.h" 00045 #include "jaus/core/discovery/subsystem.h" 00046 #include <cxutils/math/coordinates.h> 00047 00048 namespace JAUS 00049 { 00050 typedef CxUtils::Wgs Wgs; 00051 typedef CxUtils::Point3D Attitude; 00052 typedef CxUtils::Point3D Point3D; 00053 00065 class JAUS_CORE_DLL Vehicle : public Subsystem 00066 { 00067 public: 00085 class JAUS_CORE_DLL Info 00086 { 00087 public: 00088 Info() {} 00089 virtual ~Info() {} 00090 virtual bool Copy(const Info* toCopy) = 0; 00091 virtual Info* Clone() const = 0; 00092 }; 00093 typedef Mutex::ScopedPtr<Vehicle> Ptr; 00094 typedef std::map<UShort, Vehicle *> Map; 00095 Vehicle(); 00096 Vehicle(const Vehicle& vehicle); 00097 ~Vehicle(); 00098 void Update(const Wgs& position, 00099 const Attitude& attitude, 00100 const Time& time); 00101 void Update(const Point3D& velocity, 00102 const Time& time); 00103 virtual Subsystem* Clone() const; 00104 void SetAdditionalInfo(const Info* info); 00105 void DeleteAdditionalInfo(); 00106 Info* GetAdditionalInfo(); 00107 const Info* GetAdditionalInfo() const; 00108 Vehicle& operator=(const Vehicle& vehicle); 00109 static void DeleteVehicleMap(Vehicle::Map& list); 00110 static void CopyVehicleMap(const Vehicle::Map& src, Vehicle::Map& dest); 00111 Wgs mPosition; 00112 Attitude mAttitude; 00113 Point3D mLinearVelocity; 00114 int mAuthority; 00115 private: 00116 Info* mpInfo; 00117 }; 00118 } 00119 00120 #endif 00121 /* End of File */