ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
LogEvent.h
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16/*
17Log Event header file
18
19Author: Alex Reynolds
20*/
21#ifndef LOG_EVENT_H
22#define LOG_EVENT_H
23
24#include "architecture/Tasks.h"
25#include "data_management/GraphTreeObject.h"
26#include "data_management/DataIO.hpp"
27#include "core/clockwerkerrors.h"
28#include "logging/SimLogger.h"
29#include "simulation/SimulationSteps.h"
30
31namespace modelspace {
32
33 /// @brief Class to execute logging
34 ///
35 /// This event executes logging in the specified logger whenever
36 /// triggered. The triggering events will be determined by the
37 /// selected monitor.
38 class LogEvent : public clockwerk::Event {
39 public:
42
45
48
49 LogEvent(clockwerk::SimLogger &log, clockwerk::Task &pnt, int schedule_slot=END_STEP, const std::string &m_name="log_event");
50 LogEvent(clockwerk::SimLogger &log, clockwerk::Executive &e, int schedule_slot=END_STEP, const std::string &m_name="log_event");
51 ~LogEvent() {};
52 protected:
53 /// @brief Function to set up and start our logger
54 int start();
55
56 /// @brief Function to check monitor input conditions and set trigger
57 /// flag accordingly. Should be implemented in derived class
58 /// @return Error code corresponding to success/failure
59 /// @note Will NOT run if trigger and persistence are true
60 int execute();
61
62 /// Handle to our logger object
63 clockwerk::SimLogger &_logger;
64 };
65
66}
67
68#endif
Base event class.
Definition Tasks.h:278
Central control mechanism to run simulations and software.
Definition Executive.h:43
Class for logging data to a file.
Definition SimLogger.h:67
This is the base implementation of the task class.
Definition Tasks.h:68
Class to execute logging.
Definition LogEvent.h:38
int execute()
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
Definition LogEvent.cpp:37
int start()
Function to set up and start our logger.
Definition LogEvent.cpp:27
clockwerk::SimLogger & _logger
Handle to our logger object.
Definition LogEvent.h:63
#define START_PARAMS
Definition macros.h:96
#define END_OUTPUTS
Definition macros.h:90
#define END_PARAMS
Definition macros.h:98
#define START_OUTPUTS
Definition macros.h:88
#define END_INPUTS
Definition macros.h:94
#define START_INPUTS
Definition macros.h:92
Class to propagate CR3BP dynamics in characteristic units.
Definition ConfigurationWriter.cpp:18