MAK RTIspy API Documentation for HLA 1.3
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
BallController13 Class Reference
+ Inheritance diagram for BallController13:
+ Collaboration diagram for BallController13:

Public Member Functions

 BallController13 (BallMap *data, DdmRegionMap *regionData)
virtual ~BallController13 ()
virtual bool createAndJoinFederation (const std::wstring &federation, const std::wstring &federateType, const std::wstring &federateName=std::wstring(), bool includeInterExt=false)
virtual bool resignAndDestroyFederation ()
virtual bool subscribe ()
virtual bool unsubscribe ()
virtual void deleteBall (const std::wstring id)
virtual void acquireBall (const std::wstring id)
virtual void divestBall (const std::wstring id)
virtual bool subscribeWithRegion (int xLowerBound, int yLowerBound, int xUpperBound, int yUpperBound)
virtual bool unsubscribeWithRegions (bool resubscribeWithoutRegion)
virtual bool unsubscribeWithRegionsKeepRegionInfo (bool resubscribeWithoutRegion)
void ballDiscovered (ObjectParams13 *objParams)
void ballRemoved (RTI::ObjectHandle handle)
void ballVisible (RTI::ObjectHandle handle)
void ballNotVisible (RTI::ObjectHandle handle)
void ballUpdated (RTI::ObjectHandle handle, const RTI::AttributeHandleValuePairSet &attrVals)
void releaseOwnership (RTI::ObjectHandle theObject, RTI::AttributeHandleSet const &attributes)
void ownershipAcquired (RTI::ObjectHandle theObject, RTI::AttributeHandleSet const &attributes)
void assumeOwnership (RTI::ObjectHandle theObject, RTI::AttributeHandleSet const &attributes)
void ownershipDivested (RTI::ObjectHandle theObject, RTI::AttributeHandleSet const &attributes)
virtual void setDimensions (int minX, int minY, int maxX, int maxY)
virtual const std::wstring & federateId () const
virtual const std::wstring & federateType () const
virtual const std::wstring & federateName () const
virtual const std::wstring & federationName () const
virtual bool isFederateNameSupported () const
virtual bool isInteractionExtensionSupported () const
- Public Member Functions inherited from BallController
 BallController (BallMap *data, DdmRegionMap *regionData)
virtual ~BallController ()
virtual void update ()
virtual void addBall (int x, int y)
virtual void setBallColor (BallColor)
virtual bool isDdmEnabled () const
virtual bool isOwnershipTransferEnabled () const
virtual bool isConnected () const
virtual bool isJoined () const
virtual bool isSubscribed () const
virtual void getPendingTextEvents (std::list< TextEvent > &textEvents)
virtual const std::wstring & getLog () const
virtual void clearLog ()

Protected Member Functions

virtual void sendUpdates ()
virtual void receiveUpdates ()
virtual void requestNewBall (Ball *ball, const std::wstring name)
void setAttributesForBall (RTI::AttributeHandleValuePairSet &attrVals, const Ball *ball)
void setBallFromAttributes (Ball *ball, const RTI::AttributeHandleValuePairSet &attrVals)
void subscribeToDefaultRegion ()
void unsubscribeFromDefaultRegion (bool deleteDiscoveredBalls)
virtual void deleteKnownBalls (bool deleteOwned, bool deleteOthers)
void markBallsOutOfScope ()
bool createPublicationRegion (Ball *ball)
std::string constructTag (const Ball *ball) const
- Protected Member Functions inherited from BallController
virtual void moveBalls ()
virtual void calculateNewLoc (double x, double y, double distance, double direction, double &newX, double &newY) const
virtual bool calculateVertWallCollision (double x, double y, double distance, double direction, double newX, double newY, double radius, double &finalDirection, double &distAfterColl, double &collX, double &collY, double &finalX, double &finalY) const
virtual bool calculateHorizWallCollision (double x, double y, double distance, double direction, double newX, double newY, double radius, double &finalDirection, double &distAfterColl, double &collX, double &collY, double &finalX, double &finalY) const

Protected Attributes

BallMap myPendingBalls
RTI::RTIambassadormyRtiAmbassador
HlaBounceFederateAmbassadormyFederateAmbassador
RTI::FederateHandle myFederateHandle
std::wstring myFederateHandleString
std::wstring myFederateType
std::wstring myFederationName
bool myIsSubscribedToDefaultRegion
RTI::RegionmySubscriptionRegion
int myDdmXRangeConv
int myDdmYRangeConv
RTI::ObjectClassHandle myBallClass
RTI::AttributeHandle myColorAttr
RTI::AttributeHandle mySizeAttr
RTI::AttributeHandle myXAttr
RTI::AttributeHandle myYAttr
RTI::AttributeHandle mySpeedAttr
RTI::AttributeHandle myDirectionAttr
RTI::AttributeHandleSetmyAllBallAttrs
RTI::AttributeHandleValuePairSetmyAttrVals
RTI::AttributeHandle myPrivToDeleteAttr
RTI::SpaceHandle myXYSpace
RTI::DimensionHandle myXDim
RTI::DimensionHandle myYDim
- Protected Attributes inherited from BallController
BallMapmyBallData
DdmRegionMapmyRegionData
std::list< TextEventmyPendingTextEvents
bool myIsConnected
bool myDdmEnabled
bool myOwnershipTransferEnabled
bool myIsJoined
bool myIsSubscribed
int myMinX
int myMinY
int myMaxX
int myMaxY
unsigned int myNextBallNumber
BallColor myBallColor
std::wstring myLog

Static Protected Attributes

static const std::string theFedFile = "MakHlaBounce13.fed"
static const std::string theBallClassName = "Ball"
static const std::string theColorAttrName = "Color"
static const std::string theSizeAttrName = "Size"
static const std::string theXAttrName = "XLocation"
static const std::string theYAttrName = "YLocation"
static const std::string theSpeedAttrName = "Speed"
static const std::string theDirectionAttrName = "Direction"
static const std::string thePrivToDeleteAttrName = "privilegeToDelete"
static const std::string theXYSpaceName = "XYSpace"
static const std::string theXDimName = "X"
static const std::string theYDimName = "Y"
- Static Protected Attributes inherited from BallController
static const double pi = 3.14159265
static const double maxRadians = 2*BallController::pi
static const double maxDegrees = 360
static const double degreesToRadians

Private Member Functions

 BallController13 ()

Constructor & Destructor Documentation

BallController13::BallController13 ( BallMap data,
DdmRegionMap regionData 
)
BallController13::~BallController13 ( )
virtual
BallController13::BallController13 ( )
private

Member Function Documentation

void BallController13::acquireBall ( const std::wstring  id)
virtual
void BallController13::assumeOwnership ( RTI::ObjectHandle  theObject,
RTI::AttributeHandleSet const &  attributes 
)
void BallController13::ballDiscovered ( ObjectParams13 objParams)
void BallController13::ballNotVisible ( RTI::ObjectHandle  handle)
void BallController13::ballRemoved ( RTI::ObjectHandle  handle)
void BallController13::ballUpdated ( RTI::ObjectHandle  handle,
const RTI::AttributeHandleValuePairSet attrVals 
)
void BallController13::ballVisible ( RTI::ObjectHandle  handle)
std::string BallController13::constructTag ( const Ball ball) const
protected
bool BallController13::createAndJoinFederation ( const std::wstring &  federation,
const std::wstring &  federateType,
const std::wstring &  federateName = std::wstring(),
bool  includeInterExt = false 
)
virtual
bool BallController13::createPublicationRegion ( Ball ball)
protected
void BallController13::deleteBall ( const std::wstring  id)
virtual
void BallController13::deleteKnownBalls ( bool  deleteOwned,
bool  deleteOthers 
)
protectedvirtual
void BallController13::divestBall ( const std::wstring  id)
virtual
const std::wstring & BallController13::federateId ( ) const
virtual

Implements BallController.

References myFederateHandleString.

const std::wstring & BallController13::federateName ( ) const
virtual

Implements BallController.

const std::wstring & BallController13::federateType ( ) const
virtual

Implements BallController.

References myFederateType.

Referenced by createAndJoinFederation().

const std::wstring & BallController13::federationName ( ) const
virtual

Implements BallController.

References myFederationName.

Referenced by resignAndDestroyFederation().

bool BallController13::isFederateNameSupported ( ) const
virtual

Implements BallController.

bool BallController13::isInteractionExtensionSupported ( ) const
virtual

Implements BallController.

void BallController13::markBallsOutOfScope ( )
protected
void BallController13::ownershipAcquired ( RTI::ObjectHandle  theObject,
RTI::AttributeHandleSet const &  attributes 
)
void BallController13::ownershipDivested ( RTI::ObjectHandle  theObject,
RTI::AttributeHandleSet const &  attributes 
)
void BallController13::receiveUpdates ( )
protectedvirtual
void BallController13::releaseOwnership ( RTI::ObjectHandle  theObject,
RTI::AttributeHandleSet const &  attributes 
)
void BallController13::requestNewBall ( Ball ball,
const std::wstring  name 
)
protectedvirtual

Implements BallController.

References myPendingBalls.

bool BallController13::resignAndDestroyFederation ( )
virtual
void BallController13::sendUpdates ( )
protectedvirtual
void BallController13::setAttributesForBall ( RTI::AttributeHandleValuePairSet attrVals,
const Ball ball 
)
protected
void BallController13::setBallFromAttributes ( Ball ball,
const RTI::AttributeHandleValuePairSet attrVals 
)
protected
void BallController13::setDimensions ( int  minX,
int  minY,
int  maxX,
int  maxY 
)
virtual

Reimplemented from BallController.

References myDdmXRangeConv, and myDdmYRangeConv.

bool BallController13::subscribe ( )
virtual
void BallController13::subscribeToDefaultRegion ( )
protected
bool BallController13::subscribeWithRegion ( int  xLowerBound,
int  yLowerBound,
int  xUpperBound,
int  yUpperBound 
)
virtual
bool BallController13::unsubscribe ( )
virtual
void BallController13::unsubscribeFromDefaultRegion ( bool  deleteDiscoveredBalls)
protected
bool BallController13::unsubscribeWithRegions ( bool  resubscribeWithoutRegion)
virtual
bool BallController13::unsubscribeWithRegionsKeepRegionInfo ( bool  resubscribeWithoutRegion)
virtual

Member Data Documentation

RTI::AttributeHandleSet* BallController13::myAllBallAttrs
protected
RTI::AttributeHandleValuePairSet* BallController13::myAttrVals
protected
RTI::ObjectClassHandle BallController13::myBallClass
protected
RTI::AttributeHandle BallController13::myColorAttr
protected
int BallController13::myDdmXRangeConv
protected
int BallController13::myDdmYRangeConv
protected
RTI::AttributeHandle BallController13::myDirectionAttr
protected
HlaBounceFederateAmbassador* BallController13::myFederateAmbassador
protected
RTI::FederateHandle BallController13::myFederateHandle
protected

Referenced by createAndJoinFederation().

std::wstring BallController13::myFederateHandleString
protected
std::wstring BallController13::myFederateType
protected
std::wstring BallController13::myFederationName
protected
bool BallController13::myIsSubscribedToDefaultRegion
protected
BallMap BallController13::myPendingBalls
protected

Referenced by requestNewBall(), and sendUpdates().

RTI::AttributeHandle BallController13::myPrivToDeleteAttr
protected
RTI::RTIambassador* BallController13::myRtiAmbassador
protected
RTI::AttributeHandle BallController13::mySizeAttr
protected
RTI::AttributeHandle BallController13::mySpeedAttr
protected
RTI::Region* BallController13::mySubscriptionRegion
protected
RTI::AttributeHandle BallController13::myXAttr
protected
RTI::DimensionHandle BallController13::myXDim
protected
RTI::SpaceHandle BallController13::myXYSpace
protected
RTI::AttributeHandle BallController13::myYAttr
protected
RTI::DimensionHandle BallController13::myYDim
protected
const std::string BallController13::theBallClassName = "Ball"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theColorAttrName = "Color"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theDirectionAttrName = "Direction"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theFedFile = "MakHlaBounce13.fed"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::thePrivToDeleteAttrName = "privilegeToDelete"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theSizeAttrName = "Size"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theSpeedAttrName = "Speed"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theXAttrName = "XLocation"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theXDimName = "X"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theXYSpaceName = "XYSpace"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theYAttrName = "YLocation"
staticprotected

Referenced by createAndJoinFederation().

const std::string BallController13::theYDimName = "Y"
staticprotected

Referenced by createAndJoinFederation().


The documentation for this class was generated from the following files:

Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)