WSF
WsfXIO_EventResults.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFXIO_EVENTRESULTS_HPP
13#define WSFXIO_EVENTRESULTS_HPP
14
15#include "wsf_export.h"
16
17#include <ostream>
18
19#include "WsfEventResult.hpp"
21
22namespace wsf
23{
24namespace event
25{
26
27// ===================================================================================================
29{
30public:
31 HandleConnect(double aSimTime, WsfXIO_Connection* aConnectionPtr, const Settings& aSettings)
32 : Result(aSimTime, aSettings)
33 , mConnectionPtr(aConnectionPtr)
34 {
35 }
36 ~HandleConnect() override = default;
37
38 void Print(std::ostream& aStream) const override;
39 void PrintCSV(std::ostream& aStream) const override;
40
41private:
42 WsfXIO_Connection* mConnectionPtr;
43};
44
45// ===================================================================================================
47{
48public:
49 HandleDisconnect(double aSimTime, WsfXIO_Connection* aConnectionPtr, const Settings& aSettings)
50 : Result(aSimTime, aSettings)
51 , mConnectionPtr(aConnectionPtr)
52 {
53 }
54 ~HandleDisconnect() override = default;
55
56 void Print(std::ostream& aStream) const override;
57 void PrintCSV(std::ostream& aStream) const override;
58
59private:
60 WsfXIO_Connection* mConnectionPtr;
61};
62
63// ===================================================================================================
65{
66public:
67 HandleBandwidthData(double aSimTime,
68 int aTotalSentBytes,
69 int aDeltaSentBytes,
70 int aTotalRecvBytes,
71 int aDeltaRecvBytes,
72 double aDeltaTime,
73 const Settings& aSettings)
74 : Result(aSimTime, aSettings)
75 , mTotalSentBytes(aTotalSentBytes)
76 , mDeltaSentBytes(aDeltaSentBytes)
77 , mTotalRecvBytes(aTotalRecvBytes)
78 , mDeltaRecvBytes(aDeltaRecvBytes)
79 , mDeltaTime(aDeltaTime)
80 {
81 }
82 ~HandleBandwidthData() override = default;
83
84 void Print(std::ostream& aStream) const override;
85 void PrintCSV(std::ostream& aStream) const override;
86
87private:
88 int mTotalSentBytes;
89 int mDeltaSentBytes;
90 int mTotalRecvBytes;
91 int mDeltaRecvBytes;
92 double mDeltaTime;
93};
94
95} // namespace event
96} // namespace wsf
97
98#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfXIO_Connection.hpp:37
~HandleBandwidthData() override=default
void PrintCSV(std::ostream &aStream) const override
Definition WsfXIO_EventResults.cpp:132
HandleBandwidthData(double aSimTime, int aTotalSentBytes, int aDeltaSentBytes, int aTotalRecvBytes, int aDeltaRecvBytes, double aDeltaTime, const Settings &aSettings)
Definition WsfXIO_EventResults.hpp:67
void Print(std::ostream &aStream) const override
Definition WsfXIO_EventResults.cpp:123
void Print(std::ostream &aStream) const override
Definition WsfXIO_EventResults.cpp:35
~HandleConnect() override=default
HandleConnect(double aSimTime, WsfXIO_Connection *aConnectionPtr, const Settings &aSettings)
Definition WsfXIO_EventResults.hpp:31
void PrintCSV(std::ostream &aStream) const override
Definition WsfXIO_EventResults.cpp:60
void PrintCSV(std::ostream &aStream) const override
Definition WsfXIO_EventResults.cpp:104
HandleDisconnect(double aSimTime, WsfXIO_Connection *aConnectionPtr, const Settings &aSettings)
Definition WsfXIO_EventResults.hpp:49
~HandleDisconnect() override=default
void Print(std::ostream &aStream) const override
Definition WsfXIO_EventResults.cpp:87
Result(double aSimTime, Settings aSettings=Settings{}, std::string aEventName="UNSET")
Definition WsfEventResult.hpp:119
Definition WsfEventResult.hpp:35
Definition WsfXIO_EventResults.cpp:33
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved