WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
Scheduler.h
Go to the documentation of this file.
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/*
17Scheduler header file
18
19Author: Alex Reynolds
20*/
21#ifndef FLIGHT_SCHEDULER_H
22#define FLIGHT_SCHEDULER_H
23
24#include "types.h"
26#include "architecture/Time.h"
27#include "flight/App.h"
28
29namespace warpos {
30 class FlightExecutive;
31
43 public:
45 Scheduler();
46
49 virtual int16 startup();
50
53 virtual int16 step(const clockwerk::Time& step_val);
54
59 virtual int16 run();
60
66 virtual int16 registerApp(App& app, int16 slot);
67
71 virtual int16 unregisterApp(int16 slot);
72
74 void terminate() {_is_terminated = true;}
75
78
82 protected:
84 bool _is_terminated = false;
85
88 };
89
90}
91
92#endif
Base class for object organization.
Definition GraphTreeObject.h:98
Wrapper to manage and convert time as timespce.
Definition Time.h:53
Base app class for derived implementation.
Definition App.h:55
Executive derivation specifically to run flight systems.
Definition FlightExecutive.h:46
virtual int16 step(const clockwerk::Time &step_val)
Function to step the scheduler by a single step.
Definition Scheduler.cpp:29
virtual int16 run()
Function to run the scheduler until pre-determined end conditions identified/calculated by the schedu...
Definition Scheduler.cpp:33
virtual int16 unregisterApp(int16 slot)
Function to unregister a certain schedule slot.
Definition Scheduler.cpp:41
bool isTerminated()
Get whether scheduler is terminated.
Definition Scheduler.h:77
Scheduler()
Constructor for the scheduler.
Definition Scheduler.cpp:21
FlightExecutive * _exc_ptr
Pointer to the executive which may optionally be registered with scheduler.
Definition Scheduler.h:87
void setExecutive(FlightExecutive *exc)
Set the flight executive for the scheduler.
Definition Scheduler.h:81
bool _is_terminated
Flag to indicate whether the scheduler is terminated.
Definition Scheduler.h:84
virtual int16 registerApp(App &app, int16 slot)
Function to register apps with the scheduler. Depending on the scheduler implementation these may be ...
Definition Scheduler.cpp:37
virtual int16 startup()
Function to start and configure the scheduler.
Definition Scheduler.cpp:25
void terminate()
Terminate the scheduler.
Definition Scheduler.h:74
Definition DeadReckon.cpp:20