Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(662)

Unified Diff: src/woss/model/definitions/woss-location.h

Issue 14677043: UAN-WOSS framework
Patch Set: Bug fixes thanks to Randall and Raul, new features added as per WOSS 1.5.0 Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/woss/helper/woss-helper.cc ('k') | src/woss/model/definitions/woss-location.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/woss/model/definitions/woss-location.h
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/woss/model/definitions/woss-location.h
@@ -0,0 +1,74 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2015 Federico Guerra
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Federico Guerra <federico@guerra-tlc.com>
+ */
+
+#ifdef NS3_WOSS_SUPPORT
+
+#ifndef WOSS_LOCATION_H
+#define WOSS_LOCATION_H
+
+
+#include <ns3/mobility-model.h>
+#include <location-definitions.h>
+
+
+namespace ns3 {
+
+/**
+* \class WossLocation
+*
+* Wrapper class for woss::Location. woss::Location embeds the concept of
+* node position and mobility into the WOSS framework.
+*/
+class WossLocation : public woss::Location
+{
+
+public:
+ /**
+ * \param model underlying ns3::MobilityModel
+ */
+ WossLocation (Ptr<MobilityModel> model);
+
+ virtual ~WossLocation ();
+
+ /**
+ * This is the main function called by the WOSS framework in order to get
+ * the node's current position.
+ *
+ * \returns converts the underlying MobilityModel::GetPosition()
+ * into a woss::CoordZ object
+ */
+ virtual woss::CoordZ getLocation ();
+
+
+ void SetMobilityModel (Ptr<MobilityModel> model);
+
+ Ptr<MobilityModel> GetMobilityModel ();
+
+protected:
+ Ptr<MobilityModel> m_mobModel;
+
+};
+
+
+}
+
+#endif // WOSS_LOCATION_H
+
+#endif // NS3_WOSS_SUPPORT
« no previous file with comments | « src/woss/helper/woss-helper.cc ('k') | src/woss/model/definitions/woss-location.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b