ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
SimTerminationEvent.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/*
17Sim Termination header file
18
19Author: Alex Reynolds
20*/
21#ifndef SIM_TERM_EVENT_H
22#define SIM_TERM_EVENT_H
23
24#include "architecture/Tasks.h"
25#include "data_management/DataIO.hpp"
26#include "core/clockwerkerrors.h"
27#include "simulation/SimulationSteps.h"
28
29namespace modelspace {
30
31 /// @brief Class to trigger termination in scheduler
32 ///
33 /// This event terminates the sscheduler, ending its
34 /// run and allowing the simulation to exit.
35 class SimTerminationEvent : public clockwerk::Event {
36 public:
39
42
45
46 /// Overloaded onstructors for the model object -- requires monitor and (optional) name
47 SimTerminationEvent(clockwerk::Task &pnt, const std::string &m_name="sim_term_event")
48 : Event(pnt, END_STEP, m_name) {}
49 SimTerminationEvent(clockwerk::Executive &e, const std::string &m_name="sim_term_event")
50 : Event(e, END_STEP, m_name) {}
51 SimTerminationEvent(clockwerk::Task &pnt, int schedule_slot, const std::string &m_name="sim_term_event")
52 : Event(pnt, schedule_slot, m_name) {}
53 SimTerminationEvent(clockwerk::Executive &e, int schedule_slot, const std::string &m_name="sim_term_event")
54 : Event(e, schedule_slot, m_name) {}
55 ~SimTerminationEvent() {};
56 protected:
57 /// @brief Function to check monitor input conditions and set trigger
58 /// flag accordingly. Should be implemented in derived class
59 /// @return Error code corresponding to success/failure
60 /// @note Will NOT run if trigger and persistence are true
61 int execute();
62 };
63
64}
65
66#endif
Base event class.
Definition Tasks.h:278
Event(Task &pnt, int schedule_slot=0, const std::string &m_name="Unnamed")
Task-based constructor for the task. Auto-assigns executive.
Definition Tasks.h:290
Event(Executive &executive, int schedule_slot=0, const std::string &m_name="Unnamed")
Executive-based constructor for the task.
Definition Tasks.h:298
Central control mechanism to run simulations and software.
Definition Executive.h:43
This is the base implementation of the task class.
Definition Tasks.h:68
Class to trigger termination in scheduler.
Definition SimTerminationEvent.h:35
SimTerminationEvent(clockwerk::Task &pnt, const std::string &m_name="sim_term_event")
Overloaded onstructors for the model object – requires monitor and (optional) name.
Definition SimTerminationEvent.h:47
int execute()
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
Definition SimTerminationEvent.cpp:21
#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