# Statistics Class Reference

Display statistics on sent/received messages by RTIA. More...

`#include <Statistics.hh>`

List of all members.

## Public Member Functions
| Statistics ()
| Initialize the two sets used for collecting number of messages exchanged.
void | rtiService (NetworkMessage::Type)
| Increment counter for RTIG message type received.
void | federateService (Message::Type)
| Increment counter for Federate message type received.
bool | display ()
bool | displayZero ()
## Protected Attributes
std::vector< int > | federateServiceSet
| Collects number of messages exchanged between federate and RTIA.
std::vector< int > | rtiServiceSet
| Collects number of messages exchanged between RTIG and RTIA.
bool | myDisplay
| Display number of sent messages, for each message type.
bool | myDisplayZero
| Display messages information including messages not sent.
## Static Protected Attributes
static std::vector< std::string > | fedMessageName
| Names of Message messages.
static std::vector< std::string > | rtiMessageName
| Names of NetworkMessage-class messages.
static bool | initialized = false
| names initialized ?
## Friends
std::ostream & | operator<< (std::ostream &, Statistics &)

## Detailed Description

Display statistics on sent/received messages by RTIA.

This class collects information type exchanged by federate/RTIA and RTIA/RTIG. Statistics are displayed on exit only if CERTI_NO_STATISTICS environment variable has not been set.

Definition at line 41 of file Statistics.hh.

## Constructor & Destructor Documentation

Statistics | ( |  | ) |

Initialize the two sets used for collecting number of messages exchanged.

Definition at line 50 of file Statistics.cc.

References NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT, Message::ANNOUNCE_SYNCHRONIZATION_POINT, NetworkMessage::ATTRIBUTE_IS_NOT_OWNED, Message::ATTRIBUTE_IS_NOT_OWNED, Message::ATTRIBUTE_OWNED_BY_RTI, NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION, Message::ATTRIBUTE_OWNERSHIP_ACQUISITION, NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE, Message::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE, NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION, Message::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION, NetworkMessage::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION, Message::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION, NetworkMessage::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE, Message::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE, NetworkMessage::ATTRIBUTE_OWNERSHIP_UNAVAILABLE, Message::ATTRIBUTE_OWNERSHIP_UNAVAILABLE, Message::ATTRIBUTES_IN_SCOPE, Message::ATTRIBUTES_OUT_OF_SCOPE, NetworkMessage::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION, Message::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION, NetworkMessage::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE, Message::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE, NetworkMessage::CHANGE_ATTRIBUTE_ORDER_TYPE, Message::CHANGE_ATTRIBUTE_ORDER_TYPE, NetworkMessage::CHANGE_ATTRIBUTE_TRANSPORT_TYPE, Message::CHANGE_ATTRIBUTE_TRANSPORTATION_TYPE, NetworkMessage::CHANGE_INTERACTION_ORDER_TYPE, Message::CHANGE_INTERACTION_ORDER_TYPE, NetworkMessage::CHANGE_INTERACTION_TRANSPORT_TYPE, Message::CHANGE_INTERACTION_TRANSPORTATION_TYPE, NetworkMessage::CLOSE_CONNEXION, Message::CLOSE_CONNEXION, NetworkMessage::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION, Message::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION, NetworkMessage::CREATE_FEDERATION_EXECUTION, Message::CREATE_FEDERATION_EXECUTION, NetworkMessage::DDM_ASSOCIATE_REGION, Message::DDM_ASSOCIATE_REGION, NetworkMessage::DDM_CREATE_REGION, Message::DDM_CREATE_REGION, NetworkMessage::DDM_DELETE_REGION, Message::DDM_DELETE_REGION, NetworkMessage::DDM_MODIFY_REGION, Message::DDM_MODIFY_REGION, Message::DDM_REGISTER_OBJECT, Message::DDM_REQUEST_UPDATE, NetworkMessage::DDM_SUBSCRIBE_ATTRIBUTES, Message::DDM_SUBSCRIBE_ATTRIBUTES, NetworkMessage::DDM_SUBSCRIBE_INTERACTION, Message::DDM_SUBSCRIBE_INTERACTION, NetworkMessage::DDM_UNASSOCIATE_REGION, Message::DDM_UNASSOCIATE_REGION, NetworkMessage::DDM_UNSUBSCRIBE_ATTRIBUTES, Message::DDM_UNSUBSCRIBE_ATTRIBUTES, NetworkMessage::DDM_UNSUBSCRIBE_INTERACTION, Message::DDM_UNSUBSCRIBE_INTERACTION, NetworkMessage::DELETE_OBJECT, Message::DELETE_OBJECT_INSTANCE, NetworkMessage::DESTROY_FEDERATION_EXECUTION, Message::DESTROY_FEDERATION_EXECUTION, Message::DISABLE_ASYNCHRONOUS_DELIVERY, Message::DISABLE_ATTRIBUTE_RELEVANCE_ADVISORY_SWITCH, Message::DISABLE_ATTRIBUTE_SCOPE_ADVISORY_SWITCH, Message::DISABLE_CLASS_RELEVANCE_ADVISORY_SWITCH, Message::DISABLE_INTERACTION_RELEVANCE_ADVISORY_SWITCH, Message::DISABLE_TIME_CONSTRAINED, Message::DISABLE_TIME_REGULATION, NetworkMessage::DISCOVER_OBJECT, Message::DISCOVER_OBJECT_INSTANCE, Message::ENABLE_ASYNCHRONOUS_DELIVERY, Message::ENABLE_ATTRIBUTE_RELEVANCE_ADVISORY_SWITCH, Message::ENABLE_ATTRIBUTE_SCOPE_ADVISORY_SWITCH, Message::ENABLE_CLASS_RELEVANCE_ADVISORY_SWITCH, Message::ENABLE_INTERACTION_RELEVANCE_ADVISORY_SWITCH, Message::ENABLE_TIME_CONSTRAINED, Message::ENABLE_TIME_REGULATION, FED_MSG_NAME, NetworkMessage::FEDERATE_RESTORE_COMPLETE, Message::FEDERATE_RESTORE_COMPLETE, NetworkMessage::FEDERATE_RESTORE_NOT_COMPLETE, Message::FEDERATE_RESTORE_NOT_COMPLETE, NetworkMessage::FEDERATE_SAVE_BEGUN, Message::FEDERATE_SAVE_BEGUN, NetworkMessage::FEDERATE_SAVE_COMPLETE, Message::FEDERATE_SAVE_COMPLETE, NetworkMessage::FEDERATE_SAVE_NOT_COMPLETE, Message::FEDERATE_SAVE_NOT_COMPLETE, NetworkMessage::FEDERATION_NOT_RESTORED, Message::FEDERATION_NOT_RESTORED, NetworkMessage::FEDERATION_NOT_SAVED, Message::FEDERATION_NOT_SAVED, NetworkMessage::FEDERATION_RESTORE_BEGUN, Message::FEDERATION_RESTORE_BEGUN, NetworkMessage::FEDERATION_RESTORED, Message::FEDERATION_RESTORED, NetworkMessage::FEDERATION_SAVED, Message::FEDERATION_SAVED, NetworkMessage::FEDERATION_SYNCHRONIZED, Message::FEDERATION_SYNCHRONIZED, Message::FLUSH_QUEUE_REQUEST, Message::GET_ATTRIBUTE_HANDLE, Message::GET_ATTRIBUTE_NAME, Message::GET_ATTRIBUTE_SPACE_HANDLE, Message::GET_DIMENSION_HANDLE, Message::GET_DIMENSION_NAME, NetworkMessage::GET_FED_FILE, Message::GET_INTERACTION_CLASS_HANDLE, Message::GET_INTERACTION_CLASS_NAME, Message::GET_INTERACTION_SPACE_HANDLE, Message::GET_OBJECT_CLASS, Message::GET_OBJECT_CLASS_HANDLE, Message::GET_OBJECT_CLASS_NAME, Message::GET_OBJECT_INSTANCE_HANDLE, Message::GET_OBJECT_INSTANCE_NAME, Message::GET_ORDERING_HANDLE, Message::GET_ORDERING_NAME, Message::GET_PARAMETER_HANDLE, Message::GET_PARAMETER_NAME, Message::GET_SPACE_HANDLE, Message::GET_SPACE_NAME, Message::GET_TRANSPORTATION_HANDLE, Message::GET_TRANSPORTATION_NAME, NetworkMessage::INFORM_ATTRIBUTE_OWNERSHIP, Message::INFORM_ATTRIBUTE_OWNERSHIP, Statistics::initialized, NetworkMessage::INITIATE_FEDERATE_RESTORE, Message::INITIATE_FEDERATE_RESTORE, NetworkMessage::INITIATE_FEDERATE_SAVE, Message::INITIATE_FEDERATE_SAVE, NetworkMessage::IS_ATTRIBUTE_OWNED_BY_FEDERATE, Message::IS_ATTRIBUTE_OWNED_BY_FEDERATE, NetworkMessage::JOIN_FEDERATION_EXECUTION, Message::JOIN_FEDERATION_EXECUTION, Message::LOCAL_DELETE_OBJECT_INSTANCE, NetworkMessage::MESSAGE_NULL, Message::MODIFY_LOOKAHEAD, Statistics::myDisplay, NetworkMessage::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE, Message::NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE, Message::NEXT_EVENT_REQUEST, Message::NEXT_EVENT_REQUEST_AVAILABLE, NetworkMessage::PROVIDE_ATTRIBUTE_VALUE_UPDATE, Message::PROVIDE_ATTRIBUTE_VALUE_UPDATE, NetworkMessage::PUBLISH_INTERACTION_CLASS, Message::PUBLISH_INTERACTION_CLASS, NetworkMessage::PUBLISH_OBJECT_CLASS, Message::PUBLISH_OBJECT_CLASS, NetworkMessage::QUERY_ATTRIBUTE_OWNERSHIP, Message::QUERY_ATTRIBUTE_OWNERSHIP, Message::QUERY_FEDERATE_TIME, Message::QUERY_LBTS, Message::QUERY_LOOKAHEAD, Message::QUERY_MIN_NEXT_EVENT_TIME, NetworkMessage::RECEIVE_INTERACTION, Message::RECEIVE_INTERACTION, NetworkMessage::REFLECT_ATTRIBUTE_VALUES, Message::REFLECT_ATTRIBUTE_VALUES, NetworkMessage::REGISTER_FEDERATION_SYNCHRONIZATION_POINT, Message::REGISTER_FEDERATION_SYNCHRONIZATION_POINT, NetworkMessage::REGISTER_OBJECT, Message::REGISTER_OBJECT_INSTANCE, NetworkMessage::REMOVE_OBJECT, Message::REMOVE_OBJECT_INSTANCE, Message::REQUEST_ATTRIBUTE_OWNERSHIP_ACQUISITION, NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION, Message::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION, Message::REQUEST_ATTRIBUTE_OWNERSHIP_DIVESTITURE, NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE, Message::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE, NetworkMessage::REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE, Message::REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE, NetworkMessage::REQUEST_FEDERATION_RESTORE, Message::REQUEST_FEDERATION_RESTORE, NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED, Message::REQUEST_FEDERATION_RESTORE_FAILED, NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED, Message::REQUEST_FEDERATION_RESTORE_SUCCEEDED, NetworkMessage::REQUEST_FEDERATION_SAVE, Message::REQUEST_FEDERATION_SAVE, NetworkMessage::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE, Message::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE, Message::REQUEST_RETRACTION, NetworkMessage::RESIGN_FEDERATION_EXECUTION, Message::RESIGN_FEDERATION_EXECUTION, Message::RETRACT, RTI_MSG_NAME, NetworkMessage::SEND_INTERACTION, Message::SEND_INTERACTION, NetworkMessage::SET_ATTRIBUTE_RELEVANCE_ADVISORY_SWITCH, NetworkMessage::SET_ATTRIBUTE_SCOPE_ADVISORY_SWITCH, NetworkMessage::SET_CLASS_RELEVANCE_ADVISORY_SWITCH, NetworkMessage::SET_INTERACTION_RELEVANCE_ADVISORY_SWITCH, NetworkMessage::SET_TIME_CONSTRAINED, NetworkMessage::SET_TIME_REGULATING, NetworkMessage::START_REGISTRATION_FOR_OBJECT_CLASS, Message::START_REGISTRATION_FOR_OBJECT_CLASS, NetworkMessage::STOP_REGISTRATION_FOR_OBJECT_CLASS, Message::STOP_REGISTRATION_FOR_OBJECT_CLASS, NetworkMessage::SUBSCRIBE_INTERACTION_CLASS, Message::SUBSCRIBE_INTERACTION_CLASS, NetworkMessage::SUBSCRIBE_OBJECT_CLASS, Message::SUBSCRIBE_OBJECT_CLASS_ATTRIBUTES, NetworkMessage::SYNCHRONIZATION_POINT_ACHIEVED, Message::SYNCHRONIZATION_POINT_ACHIEVED, Message::SYNCHRONIZATION_POINT_REGISTRATION_FAILED, NetworkMessage::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED, Message::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED, Message::TICK_REQUEST, Message::TICK_REQUEST_NEXT, Message::TICK_REQUEST_STOP, Message::TIME_ADVANCE_GRANT, Message::TIME_ADVANCE_REQUEST, Message::TIME_ADVANCE_REQUEST_AVAILABLE, NetworkMessage::TIME_CONSTRAINED_ENABLED, Message::TIME_CONSTRAINED_ENABLED, NetworkMessage::TIME_REGULATION_ENABLED, Message::TIME_REGULATION_ENABLED, NetworkMessage::TURN_INTERACTIONS_OFF, Message::TURN_INTERACTIONS_OFF, NetworkMessage::TURN_INTERACTIONS_ON, Message::TURN_INTERACTIONS_ON, Message::TURN_UPDATES_OFF_FOR_OBJECT_INSTANCE, Message::TURN_UPDATES_ON_FOR_OBJECT_INSTANCE, NetworkMessage::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE, Message::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE, NetworkMessage::UNPUBLISH_INTERACTION_CLASS, Message::UNPUBLISH_INTERACTION_CLASS, NetworkMessage::UNPUBLISH_OBJECT_CLASS, Message::UNPUBLISH_OBJECT_CLASS, NetworkMessage::UNSUBSCRIBE_INTERACTION_CLASS, Message::UNSUBSCRIBE_INTERACTION_CLASS, NetworkMessage::UNSUBSCRIBE_OBJECT_CLASS, Message::UNSUBSCRIBE_OBJECT_CLASS, NetworkMessage::UPDATE_ATTRIBUTE_VALUES, and Message::UPDATE_ATTRIBUTE_VALUES.

## Member Function Documentation

void rtiService | ( | NetworkMessage::Type | service | ) |

Increment counter for RTIG message type received.

Definition at line 315 of file Statistics.cc.

References Statistics::rtiServiceSet.

Referenced by FederationManagement::joinFederationExecution(), and RTIA::processNetworkMessage().

void federateService | ( | Message::Type | service | ) |

Increment counter for Federate message type received.

Definition at line 323 of file Statistics.cc.

References Statistics::federateServiceSet.

Referenced by RTIA::chooseFederateProcessing().

bool display | ( | void |  | ) | `[inline]`

Definition at line 48 of file Statistics.hh.

References Statistics::myDisplay.

Referenced by RTIA::displayStatistics().

bool displayZero | ( |  | ) | `[inline]`

Definition at line 49 of file Statistics.hh.

References Statistics::myDisplayZero.

Referenced by certi::rtia::operator<<().

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | ,
|  | Statistics & |  |
| ) |  |  | `[friend]`

## Member Data Documentation

std::vector<int> federateServiceSet`[protected]`

Collects number of messages exchanged between federate and RTIA.

Definition at line 55 of file Statistics.hh.

Referenced by Statistics::federateService(), and certi::rtia::operator<<().

std::vector<int> rtiServiceSet`[protected]`

Collects number of messages exchanged between RTIG and RTIA.

Definition at line 57 of file Statistics.hh.

Referenced by certi::rtia::operator<<(), and Statistics::rtiService().

vector< string > fedMessageName`[static, protected]`

Names of Message messages.

Definition at line 59 of file Statistics.hh.

vector< string > rtiMessageName`[static, protected]`

Names of NetworkMessage-class messages.

Definition at line 61 of file Statistics.hh.

bool myDisplay`[protected]`

Display number of sent messages, for each message type.

Definition at line 63 of file Statistics.hh.

Referenced by Statistics::display(), and Statistics::Statistics().

bool myDisplayZero`[protected]`

Display messages information including messages not sent.

Definition at line 65 of file Statistics.hh.

Referenced by Statistics::displayZero().

bool initialized = false`[static, protected]`

names initialized ?

Definition at line 67 of file Statistics.hh.

Referenced by Statistics::Statistics().

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

- Statistics.hh
- Statistics.cc