![]() |
MAK RTIspy API Documentation for HLA 1.3
|
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 |
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 () | |
| BallController13::BallController13 | ( | BallMap * | data, |
| DdmRegionMap * | regionData | ||
| ) |
|
virtual |
|
private |
|
virtual |
Implements BallController.
References RTI::Exception::_name, RTI::Exception::_reason, RTI::AttributeHandleSet::add(), RTI::RTIambassador::attributeOwnershipAcquisition(), constructTag(), RTI::AttributeHandleSetFactory::create(), RTI::AttributeHandleSet::getHandle(), ObjectParams13::instanceHandle(), Ball::isMine(), Ball::isVisible(), myAllBallAttrs, BallController::myBallData, BallController::myLog, BallController::myOwnershipTransferEnabled, myPrivToDeleteAttr, myRtiAmbassador, Ball::objectParams(), RTI::AttributeHandleSet::size(), and toWString().
| void BallController13::assumeOwnership | ( | RTI::ObjectHandle | theObject, |
| RTI::AttributeHandleSet const & | attributes | ||
| ) |
References RTI::Exception::_name, RTI::Exception::_reason, RTI::RTIambassador::attributeOwnershipAcquisitionIfAvailable(), Ball::isMine(), Ball::isVisible(), BallController::myBallData, BallController::myLog, BallController::myOwnershipTransferEnabled, myRtiAmbassador, Ball::objectParams(), and toWString().
| void BallController13::ballDiscovered | ( | ObjectParams13 * | objParams | ) |
| void BallController13::ballNotVisible | ( | RTI::ObjectHandle | handle | ) |
References BallController::myBallData, ObjectParams13::setIsInScope(), and toWString().
| void BallController13::ballRemoved | ( | RTI::ObjectHandle | handle | ) |
References BallController::myBallData, and toWString().
| void BallController13::ballUpdated | ( | RTI::ObjectHandle | handle, |
| const RTI::AttributeHandleValuePairSet & | attrVals | ||
| ) |
References BallController::myBallData, setBallFromAttributes(), and toWString().
| void BallController13::ballVisible | ( | RTI::ObjectHandle | handle | ) |
References BallController::myBallData, ObjectParams13::setIsInScope(), and toWString().
|
protected |
References Ball::id(), and toString().
Referenced by acquireBall(), deleteBall(), deleteKnownBalls(), divestBall(), and sendUpdates().
|
virtual |
Implements BallController.
References RTI::Exception::_name, RTI::Exception::_reason, RTI::AttributeHandleSet::add(), RTI::AttributeSetFactory::create(), RTI::AttributeHandleSetFactory::create(), RTI::RTIambassador::createFederationExecution(), RTI::RTIambassador::enableAttributeScopeAdvisorySwitch(), federateType(), RTI::RTIambassador::getAttributeHandle(), RTI::RTIambassador::getDimensionHandle(), RTI::RTIambassador::getObjectClassHandle(), RTI::RTIambassador::getRoutingSpaceHandle(), RTI::RTIambassador::joinFederationExecution(), myAllBallAttrs, myAttrVals, myBallClass, myColorAttr, BallController::myDdmEnabled, myDirectionAttr, myFederateAmbassador, myFederateHandle, myFederateHandleString, myFederateType, myFederationName, BallController::myIsJoined, BallController::myLog, BallController::myOwnershipTransferEnabled, myPrivToDeleteAttr, myRtiAmbassador, mySizeAttr, mySpeedAttr, myXAttr, myXDim, myXYSpace, myYAttr, myYDim, RTI::RTIambassador::publishObjectClass(), RTI::AttributeHandleSet::size(), theBallClassName, theColorAttrName, theDirectionAttrName, theFedFile, thePrivToDeleteAttrName, theSizeAttrName, theSpeedAttrName, theXAttrName, theXDimName, theXYSpaceName, theYAttrName, theYDimName, RTI::RTIambassador::tick(), toString(), and toWString().
|
protected |
References RTI::Exception::_name, RTI::Exception::_reason, RTI::RTIambassador::associateRegionForUpdates(), RTI::RTIambassador::createRegion(), ObjectParams13::instanceHandle(), myAllBallAttrs, myDdmXRangeConv, myDdmYRangeConv, BallController::myLog, myRtiAmbassador, myXDim, myXYSpace, myYDim, RTI::RTIambassador::notifyAboutRegionModification(), Ball::objectParams(), RTI::Region::setRangeLowerBound(), RTI::Region::setRangeUpperBound(), ObjectParams13::setRegion(), Ball::size(), toWString(), Ball::x(), and Ball::y().
Referenced by ownershipAcquired(), and sendUpdates().
|
virtual |
Implements BallController.
References RTI::Exception::_name, RTI::Exception::_reason, constructTag(), RTI::RTIambassador::deleteObjectInstance(), RTI::RTIambassador::deleteRegion(), ObjectParams13::instanceHandle(), Ball::isMine(), Ball::markForDeletion(), BallController::myBallData, BallController::myDdmEnabled, BallController::myLog, myRtiAmbassador, Ball::objectParams(), ObjectParams13::region(), and toWString().
|
protectedvirtual |
References constructTag(), RTI::RTIambassador::deleteObjectInstance(), RTI::RTIambassador::deleteRegion(), ObjectParams13::instanceHandle(), Ball::isMine(), RTI::RTIambassador::localDeleteObjectInstance(), Ball::markForDeletion(), BallController::myBallData, BallController::myDdmEnabled, BallController::myIsJoined, myRtiAmbassador, Ball::objectParams(), and ObjectParams13::region().
Referenced by resignAndDestroyFederation(), unsubscribeFromDefaultRegion(), and unsubscribeWithRegionsKeepRegionInfo().
|
virtual |
Implements BallController.
References RTI::Exception::_name, RTI::Exception::_reason, RTI::AttributeHandleSet::add(), RTI::RTIambassador::cancelNegotiatedAttributeOwnershipDivestiture(), constructTag(), RTI::AttributeHandleSetFactory::create(), RTI::AttributeHandleSet::getHandle(), ObjectParams13::instanceHandle(), Ball::isMine(), myAllBallAttrs, BallController::myBallData, BallController::myLog, BallController::myOwnershipTransferEnabled, myPrivToDeleteAttr, myRtiAmbassador, RTI::RTIambassador::negotiatedAttributeOwnershipDivestiture(), Ball::objectParams(), RTI::AttributeHandleSet::size(), and toWString().
|
virtual |
Implements BallController.
References myFederateHandleString.
|
virtual |
Implements BallController.
|
virtual |
|
virtual |
|
virtual |
Implements BallController.
|
virtual |
Implements BallController.
|
protected |
References Ball::isMine(), BallController::myBallData, Ball::objectParams(), ObjectParams13::setIsInScope(), and Ball::setVisible().
Referenced by unsubscribeFromDefaultRegion().
| void BallController13::ownershipAcquired | ( | RTI::ObjectHandle | theObject, |
| RTI::AttributeHandleSet const & | attributes | ||
| ) |
| void BallController13::ownershipDivested | ( | RTI::ObjectHandle | theObject, |
| RTI::AttributeHandleSet const & | attributes | ||
| ) |
References RTI::RTIambassador::deleteRegion(), Ball::isMine(), BallController::myBallData, BallController::myDdmEnabled, BallController::myOwnershipTransferEnabled, myRtiAmbassador, Ball::objectParams(), ObjectParams13::region(), Ball::setIsMine(), toWString(), and RTI::RTIambassador::unassociateRegionForUpdates().
|
protectedvirtual |
Implements BallController.
References BallController::myLog, myRtiAmbassador, resignAndDestroyFederation(), RTI::RTIambassador::tick(), and toWString().
| void BallController13::releaseOwnership | ( | RTI::ObjectHandle | theObject, |
| RTI::AttributeHandleSet const & | attributes | ||
| ) |
References RTI::Exception::_name, RTI::Exception::_reason, RTI::RTIambassador::attributeOwnershipReleaseResponse(), RTI::RTIambassador::deleteRegion(), Ball::isMine(), BallController::myBallData, BallController::myDdmEnabled, BallController::myLog, BallController::myOwnershipTransferEnabled, myRtiAmbassador, Ball::objectParams(), ObjectParams13::region(), Ball::setIsMine(), and toWString().
|
protectedvirtual |
Implements BallController.
References myPendingBalls.
|
virtual |
Implements BallController.
References RTI::Exception::_name, RTI::Exception::_reason, RTI::DELETE_OBJECTS, deleteKnownBalls(), RTI::RTIambassador::destroyFederationExecution(), federationName(), BallController::myDdmEnabled, myFederationName, BallController::myIsJoined, BallController::myIsSubscribed, myIsSubscribedToDefaultRegion, BallController::myLog, myRtiAmbassador, RTI::RTIambassador::resignFederationExecution(), toString(), and toWString().
Referenced by receiveUpdates(), and ~BallController13().
|
protectedvirtual |
Implements BallController.
References RTI::Exception::_name, RTI::Exception::_reason, constructTag(), createPublicationRegion(), Ball::id(), ObjectParams13::instanceHandle(), Ball::isMarkedForDeletion(), Ball::isMine(), myAttrVals, myBallClass, BallController::myBallData, BallController::myDdmEnabled, myDdmXRangeConv, myDdmYRangeConv, BallController::myIsJoined, BallController::myLog, myPendingBalls, myRtiAmbassador, myXDim, myYDim, RTI::RTIambassador::notifyAboutRegionModification(), Ball::objectParams(), ObjectParams13::region(), RTI::RTIambassador::registerObjectInstance(), setAttributesForBall(), ObjectParams13::setClassHandle(), ObjectParams13::setInstanceHandle(), ObjectParams13::setInstanceName(), Ball::setObjectParams(), RTI::Region::setRangeLowerBound(), RTI::Region::setRangeUpperBound(), Ball::size(), toString(), toWString(), RTI::RTIambassador::updateAttributeValues(), Ball::x(), and Ball::y().
|
protected |
References RTI::AttributeHandleValuePairSet::add(), Ball::color(), Ball::direction(), RTI::AttributeHandleValuePairSet::empty(), myColorAttr, myDirectionAttr, mySizeAttr, mySpeedAttr, myXAttr, myYAttr, Ball::size(), Ball::speed(), swap64(), Ball::x(), and Ball::y().
Referenced by sendUpdates().
|
protected |
References RTI::AttributeHandleValuePairSet::getHandle(), RTI::AttributeHandleValuePairSet::getValueLength(), RTI::AttributeHandleValuePairSet::getValuePointer(), ObjectParams13::isInScope(), myColorAttr, myDirectionAttr, mySizeAttr, mySpeedAttr, myXAttr, myYAttr, Ball::objectParams(), Ball::setColor(), Ball::setDirection(), Ball::setSize(), Ball::setSpeed(), Ball::setVisible(), Ball::setX(), Ball::setY(), RTI::AttributeHandleValuePairSet::size(), and swap64().
Referenced by ballUpdated().
|
virtual |
Reimplemented from BallController.
References myDdmXRangeConv, and myDdmYRangeConv.
|
virtual |
Implements BallController.
References myIsSubscribedToDefaultRegion, and subscribeToDefaultRegion().
|
protected |
References RTI::Exception::_name, RTI::Exception::_reason, myAllBallAttrs, myBallClass, BallController::myIsSubscribed, myIsSubscribedToDefaultRegion, BallController::myLog, myRtiAmbassador, RTI::RTIambassador::subscribeObjectClassAttributes(), and toWString().
Referenced by subscribe(), and unsubscribeWithRegionsKeepRegionInfo().
|
virtual |
Implements BallController.
References RTI::Exception::_name, RTI::Exception::_reason, RTI::RTIambassador::createRegion(), DdmRegion13::id(), myAllBallAttrs, myBallClass, BallController::myDdmEnabled, myDdmXRangeConv, myDdmYRangeConv, BallController::myIsSubscribed, myIsSubscribedToDefaultRegion, BallController::myLog, BallController::myRegionData, myRtiAmbassador, mySubscriptionRegion, myXDim, myXYSpace, myYDim, RTI::RTIambassador::notifyAboutRegionModification(), DdmRegion13::setExtentIndex(), DdmRegion::setRangeBounds(), RTI::Region::setRangeLowerBound(), RTI::Region::setRangeUpperBound(), RTI::RTIambassador::subscribeObjectClassAttributesWithRegion(), RTI::RTIambassador::tick(), toWString(), unsubscribeFromDefaultRegion(), unsubscribeWithRegionsKeepRegionInfo(), DdmRegion::xLowerBound(), DdmRegion::xUpperBound(), DdmRegion::yLowerBound(), and DdmRegion::yUpperBound().
|
virtual |
Implements BallController.
References BallController::myIsSubscribed, unsubscribeFromDefaultRegion(), and unsubscribeWithRegions().
|
protected |
References RTI::Exception::_name, RTI::Exception::_reason, deleteKnownBalls(), markBallsOutOfScope(), myBallClass, BallController::myIsSubscribed, myIsSubscribedToDefaultRegion, BallController::myLog, BallController::myRegionData, myRtiAmbassador, toWString(), and RTI::RTIambassador::unsubscribeObjectClass().
Referenced by subscribeWithRegion(), and unsubscribe().
|
virtual |
Implements BallController.
References BallController::myDdmEnabled, BallController::myIsSubscribed, BallController::myRegionData, and unsubscribeWithRegionsKeepRegionInfo().
Referenced by unsubscribe().
|
virtual |
References RTI::Exception::_name, RTI::Exception::_reason, deleteKnownBalls(), RTI::RTIambassador::deleteRegion(), myBallClass, BallController::myDdmEnabled, BallController::myIsSubscribed, myIsSubscribedToDefaultRegion, BallController::myLog, BallController::myRegionData, myRtiAmbassador, mySubscriptionRegion, subscribeToDefaultRegion(), toWString(), and RTI::RTIambassador::unsubscribeObjectClassWithRegion().
Referenced by subscribeWithRegion(), and unsubscribeWithRegions().
|
protected |
|
protected |
Referenced by createAndJoinFederation(), and sendUpdates().
|
protected |
|
protected |
Referenced by createAndJoinFederation(), setAttributesForBall(), and setBallFromAttributes().
|
protected |
Referenced by createPublicationRegion(), sendUpdates(), setDimensions(), and subscribeWithRegion().
|
protected |
Referenced by createPublicationRegion(), sendUpdates(), setDimensions(), and subscribeWithRegion().
|
protected |
Referenced by createAndJoinFederation(), setAttributesForBall(), and setBallFromAttributes().
|
protected |
Referenced by BallController13(), createAndJoinFederation(), and ~BallController13().
|
protected |
Referenced by createAndJoinFederation().
|
protected |
Referenced by createAndJoinFederation(), and federateId().
|
protected |
Referenced by createAndJoinFederation(), and federateType().
|
protected |
Referenced by createAndJoinFederation(), federationName(), and resignAndDestroyFederation().
|
protected |
|
protected |
Referenced by requestNewBall(), and sendUpdates().
|
protected |
Referenced by acquireBall(), createAndJoinFederation(), and divestBall().
|
protected |
Referenced by acquireBall(), assumeOwnership(), BallController13(), createAndJoinFederation(), createPublicationRegion(), deleteBall(), deleteKnownBalls(), divestBall(), ownershipDivested(), receiveUpdates(), releaseOwnership(), resignAndDestroyFederation(), sendUpdates(), subscribeToDefaultRegion(), subscribeWithRegion(), unsubscribeFromDefaultRegion(), unsubscribeWithRegionsKeepRegionInfo(), and ~BallController13().
|
protected |
Referenced by createAndJoinFederation(), setAttributesForBall(), and setBallFromAttributes().
|
protected |
Referenced by createAndJoinFederation(), setAttributesForBall(), and setBallFromAttributes().
|
protected |
Referenced by subscribeWithRegion(), and unsubscribeWithRegionsKeepRegionInfo().
|
protected |
Referenced by createAndJoinFederation(), setAttributesForBall(), and setBallFromAttributes().
|
protected |
Referenced by createAndJoinFederation(), createPublicationRegion(), sendUpdates(), and subscribeWithRegion().
|
protected |
Referenced by createAndJoinFederation(), createPublicationRegion(), and subscribeWithRegion().
|
protected |
Referenced by createAndJoinFederation(), setAttributesForBall(), and setBallFromAttributes().
|
protected |
Referenced by createAndJoinFederation(), createPublicationRegion(), sendUpdates(), and subscribeWithRegion().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().
|
staticprotected |
Referenced by createAndJoinFederation().