ns-3
|
a 3d building block More...
#include <building.h>
Public Types | |
enum | BuildingType_t { Residential, Office, Commercial } |
enum | ExtWallsType_t { Wood, ConcreteWithWindows, ConcreteWithoutWindows, StoneBlocks } |
Public Member Functions | |
virtual void | DoDispose () |
Building (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax) | |
Building () | |
virtual | ~Building () |
uint32_t | GetId (void) const |
void | SetBoundaries (Box box) |
void | SetBuildingType (Building::BuildingType_t t) |
void | SetExtWallsType (Building::ExtWallsType_t t) |
void | SetNFloors (uint16_t nfloors) |
void | SetNRoomsX (uint16_t nroomx) |
void | SetNRoomsY (uint16_t nroomy) |
Box | GetBoundaries () const |
BuildingType_t | GetBuildingType () const |
ExtWallsType_t | GetExtWallsType () const |
uint16_t | GetNFloors () const |
uint16_t | GetNRoomsX () const |
uint16_t | GetNRoomsY () const |
bool | IsInside (Vector position) const |
uint16_t | GetRoomX (Vector position) const |
uint16_t | GetRoomY (Vector position) const |
uint16_t | GetFloor (Vector position) const |
![]() | |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Dispose (void) |
void | AggregateObject (Ptr< Object > other) |
AggregateIterator | GetAggregateIterator (void) const |
void | Start (void) |
![]() | |
SimpleRefCount (const SimpleRefCount &o) | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
uint32_t | GetReferenceCount (void) const |
![]() | |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::Building. |
Additional Inherited Members | |
![]() | |
virtual void | NotifyNewAggregate (void) |
virtual void | DoStart (void) |
Object (const Object &o) |
a 3d building block
ns3::Building::Building | ( | double | xMin, |
double | xMax, | ||
double | yMin, | ||
double | yMax, | ||
double | zMin, | ||
double | zMax | ||
) |
Construct a simple building with 1 room and 1 floor
xMin | x coordinates of left boundary. |
xMax | x coordinates of right boundary. |
yMin | y coordinates of bottom boundary. |
yMax | y coordinates of top boundary. |
zMin | z coordinates of down boundary. |
zMax | z coordinates of up boundary. |
References NS_FATAL_ERROR.
ns3::Building::Building | ( | ) |
Create a zero-sized building located at coordinates (0.0,0.0,0.0) and with 1 floors and 1 room.
References ns3::BuildingList::Add(), and NS_LOG_FUNCTION.
|
virtual |
Destructor
References NS_LOG_FUNCTION.
|
virtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Object.
References NS_LOG_FUNCTION.
Box ns3::Building::GetBoundaries | ( | ) | const |
Building::BuildingType_t ns3::Building::GetBuildingType | ( | ) | const |
Referenced by ns3::ItuR1238PropagationLossModel::GetLoss(), and GetTypeId().
Building::ExtWallsType_t ns3::Building::GetExtWallsType | ( | ) | const |
Referenced by GetTypeId().
uint16_t ns3::Building::GetFloor | ( | Vector | position | ) | const |
position | a position inside the building |
References IsInside(), NS_ASSERT, NS_LOG_LOGIC, and ns3::Vector3D::z.
uint32_t ns3::Building::GetId | ( | void | ) | const |
References NS_LOG_FUNCTION.
Referenced by ns3::ItuR1238PropagationLossModel::GetLoss(), ns3::SameRoomPositionAllocator::GetNext(), and GetTypeId().
uint16_t ns3::Building::GetNFloors | ( | ) | const |
Referenced by GetTypeId().
uint16_t ns3::Building::GetNRoomsX | ( | ) | const |
Referenced by GetTypeId().
uint16_t ns3::Building::GetNRoomsY | ( | ) | const |
Referenced by GetTypeId().
uint16_t ns3::Building::GetRoomX | ( | Vector | position | ) | const |
position | a position inside the building |
References IsInside(), NS_ASSERT, NS_LOG_LOGIC, and ns3::Vector3D::x.
uint16_t ns3::Building::GetRoomY | ( | Vector | position | ) | const |
position | a position inside the building |
References IsInside(), NS_ASSERT, NS_LOG_LOGIC, and ns3::Vector3D::y.
|
static |
This method returns the TypeId associated to ns3::Building.
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::Object.
References GetBoundaries(), GetBuildingType(), GetExtWallsType(), GetId(), GetNFloors(), GetNRoomsX(), GetNRoomsY(), SetBoundaries(), SetBuildingType(), SetExtWallsType(), SetNFloors(), SetNRoomsX(), SetNRoomsY(), and ns3::TypeId::SetParent().
bool ns3::Building::IsInside | ( | Vector | position | ) | const |
position | some position |
References ns3::Box::IsInside().
Referenced by GetFloor(), GetRoomX(), GetRoomY(), and ns3::BuildingsMobilityModel::SetIndoor().
void ns3::Building::SetBoundaries | ( | Box | box | ) |
Set the boundaries of the building
box | the Box defining the boundaries of the building |
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::Building::SetBuildingType | ( | Building::BuildingType_t | t | ) |
t | the type of building (i.e., Residential, Office, Commercial) |
This method allows to set building type (default is Residential)
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::Building::SetExtWallsType | ( | Building::ExtWallsType_t | t | ) |
t | the type of external walls (i.e., Wood, ConcreteWithWindows, ConcreteWithoutWindows and StoneBlocks), used for evaluating the loss due to the penetration of external walls in outdoor <-> indoor comm. |
This method allows to set external walls type (default is Residential)
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::Building::SetNFloors | ( | uint16_t | nfloors | ) |
nfloors | the number of floors in the building |
This method allows to set the number of floors in the building (default is 1)
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::Building::SetNRoomsX | ( | uint16_t | nroomx | ) |
nroomx | the number of rooms along the x axis |
This method allows to set the number of rooms along the x-axis
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::Building::SetNRoomsY | ( | uint16_t | nroomy | ) |
nroomy | the number of floors in the building |
This method allows to set the number of rooms along the y-axis
References NS_LOG_FUNCTION.
Referenced by GetTypeId().