28 { |
28 { |
29 static TypeId tid = TypeId ("ns3::MobilityModel") |
29 static TypeId tid = TypeId ("ns3::MobilityModel") |
30 .SetParent<Object> () |
30 .SetParent<Object> () |
31 .AddAttribute ("Position", "The current position of the mobility model.", |
31 .AddAttribute ("Position", "The current position of the mobility model.", |
32 TypeId::ATTR_SGC, |
32 TypeId::ATTR_SGC, |
33 Vector (0.0, 0.0, 0.0), |
33 VectorValue (Vector (0.0, 0.0, 0.0)), |
34 MakeVectorAccessor (&MobilityModel::SetPosition, |
34 MakeVectorAccessor (&MobilityModel::SetPosition, |
35 &MobilityModel::GetPosition), |
35 &MobilityModel::GetPosition), |
36 MakeVectorChecker ()) |
36 MakeVectorChecker ()) |
37 .AddAttribute ("Velocity", "The current velocity of the mobility model.", |
37 .AddAttribute ("Velocity", "The current velocity of the mobility model.", |
38 TypeId::ATTR_GET, |
38 TypeId::ATTR_GET, |
39 Vector (0.0, 0.0, 0.0), // ignored initial value. |
39 VectorValue (Vector (0.0, 0.0, 0.0)), // ignored initial value. |
40 MakeVectorAccessor (&MobilityModel::GetVelocity), |
40 MakeVectorAccessor (&MobilityModel::GetVelocity), |
41 MakeVectorChecker ()) |
41 MakeVectorChecker ()) |
42 ; |
42 ; |
43 return tid; |
43 return tid; |
44 } |
44 } |