A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
constant-velocity-mobility-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2006, 2007 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8#ifndef CONSTANT_VELOCITY_MOBILITY_MODEL_H
9#define CONSTANT_VELOCITY_MOBILITY_MODEL_H
10
12#include "mobility-model.h"
13
14#include "ns3/nstime.h"
15
16#include <stdint.h>
17
18namespace ns3
19{
20
21/**
22 * @ingroup mobility
23 *
24 * @brief Mobility model for which the current speed does not change once it has been set and until
25 * it is set again explicitly to a new value.
26 */
28{
29 public:
30 /**
31 * Register this type with the TypeId system.
32 * @return the object TypeId
33 */
34 static TypeId GetTypeId();
35 /**
36 * Create position located at coordinates (0,0,0) with
37 * speed (0,0,0).
38 */
41
42 /**
43 * @param speed the new speed to set.
44 *
45 * Set the current speed now to (dx,dy,dz)
46 * Unit is meters/s
47 */
48 void SetVelocity(const Vector& speed);
49
50 private:
51 Vector DoGetPosition() const override;
52 void DoSetPosition(const Vector& position) override;
53 Vector DoGetVelocity() const override;
54 ConstantVelocityHelper m_helper; //!< helper object for this model
55};
56
57} // namespace ns3
58
59#endif /* CONSTANT_VELOCITY_POSITION */
Utility class used to move node with constant velocity.
Mobility model for which the current speed does not change once it has been set and until it is set a...
ConstantVelocityMobilityModel()
Create position located at coordinates (0,0,0) with speed (0,0,0).
void DoSetPosition(const Vector &position) override
static TypeId GetTypeId()
Register this type with the TypeId system.
ConstantVelocityHelper m_helper
helper object for this model
Keep track of the current position and velocity of an object.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.