MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtMessageFilter Class Reference

DtMessageFilter is a base class for filters applied to DtFilteredTcpForwarder. More...

+ Inheritance diagram for DtMessageFilter:
+ Collaboration diagram for DtMessageFilter:

Public Member Functions

 DtMessageFilter (const char *name)
 Default Ctor ( created with empty list of filtered messages )
 DtMessageFilter (const char *name, const std::set< DtRtiMsgKind > &filteredKinds)
 Ctor taking a set of filtered message kinds.
virtual ~DtMessageFilter ()
 Default Dtor.
MAKRti::DtString const & name () const
 Return filter name.
const std::set< DtRtiMsgKind > & filteredMsgKinds () const
 Returns the set of all message types to which this filter may be applied - used to map messages to filters NOTE: isFilteredMsgKind may still reject the message.
virtual void filter (const DtTcpMsgSocket *fromSocket, const DtTcpMsgSocketMap *connectionList, DtTcpMsgSocketMap *destinationList, caddr_t packet, size_t size)
 If applicable message type, Apply filter to the message and modify destination list to add or remove filtered connections from full connection list NOTE: Generally it is only necessary to override the isFilteredMsgKind and doFilter() methods since all real work should be done there.
virtual bool isFilteredMsgKind (DtRtiMsgKind kind) const
 Does this filter apply to this message?

Static Public Member Functions

static void addToSocketMap (DtTcpMsgSocketMap *sockMap, DtTcpMsgSocket *sock)
 Adds the given socket to the given socket map.
static void removeFromSocketMap (DtTcpMsgSocketMap *sockMap, DtTcpMsgSocket *sock)
 Remove the given socket from the given socket map.

Protected Member Functions

virtual void doFilter (const DtTcpMsgSocket *fromSocket, const DtTcpMsgSocketMap *connectionList, DtTcpMsgSocketMap *destinationList, caddr_t packet, size_t size)
 Apply filter to the message and modify destination list to add or remove filtered connections from full connection list.

Protected Attributes

std::set< DtRtiMsgKindmyFilteredMsgKinds
MAKRti::DtString myName

Detailed Description

DtMessageFilter is a base class for filters applied to DtFilteredTcpForwarder.

DtMessageFilter and its derived classes process incoming messages and return a list of connections. The default DtMessageFilter returns an unmodified list.

Constructor & Destructor Documentation

DtMessageFilter::DtMessageFilter ( const char *  name)
inline

Default Ctor ( created with empty list of filtered messages )

DtMessageFilter::DtMessageFilter ( const char *  name,
const std::set< DtRtiMsgKind > &  filteredKinds 
)
inline

Ctor taking a set of filtered message kinds.

DtMessageFilter::~DtMessageFilter ( )
inlinevirtual

Default Dtor.

Member Function Documentation

void DtMessageFilter::addToSocketMap ( DtTcpMsgSocketMap sockMap,
DtTcpMsgSocket sock 
)
inlinestatic

Adds the given socket to the given socket map.

References DtTcpMsgSocket::inetTcpSocket().

void DtMessageFilter::doFilter ( const DtTcpMsgSocket fromSocket,
const DtTcpMsgSocketMap connectionList,
DtTcpMsgSocketMap destinationList,
caddr_t  packet,
size_t  size 
)
inlineprotectedvirtual

Apply filter to the message and modify destination list to add or remove filtered connections from full connection list.

Reimplemented in DtInternalRoutingFilter, DtUpdateInterRoutingFilter, DtRtiExecTrackingFilter, DtInternalRoutePrinterFilter, DtFedexMsgFilter, DtFederateTrackingFilter, DtRoutePrinterFilter, DtConnectConfirmFilter, and DtDeleteSocketFilter.

Referenced by filter().

void DtMessageFilter::filter ( const DtTcpMsgSocket fromSocket,
const DtTcpMsgSocketMap connectionList,
DtTcpMsgSocketMap destinationList,
caddr_t  packet,
size_t  size 
)
inlinevirtual

If applicable message type, Apply filter to the message and modify destination list to add or remove filtered connections from full connection list NOTE: Generally it is only necessary to override the isFilteredMsgKind and doFilter() methods since all real work should be done there.

References doFilter(), and isFilteredMsgKind().

const std::set< DtRtiMsgKind > & DtMessageFilter::filteredMsgKinds ( ) const
inline

Returns the set of all message types to which this filter may be applied - used to map messages to filters NOTE: isFilteredMsgKind may still reject the message.

References myFilteredMsgKinds.

bool DtMessageFilter::isFilteredMsgKind ( DtRtiMsgKind  kind) const
inlinevirtual

Does this filter apply to this message?

  • Called internally by filter to determine whether to perform filtering

References myFilteredMsgKinds.

Referenced by filter().

MAKRti::DtString const & DtMessageFilter::name ( ) const
inline

Return filter name.

References myName.

void DtMessageFilter::removeFromSocketMap ( DtTcpMsgSocketMap sockMap,
DtTcpMsgSocket sock 
)
inlinestatic

Remove the given socket from the given socket map.

References DtTcpMsgSocket::inetTcpSocket().

Member Data Documentation

std::set<DtRtiMsgKind> DtMessageFilter::myFilteredMsgKinds
protected
MAKRti::DtString DtMessageFilter::myName
protected

Referenced by name().


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

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)