24#ifndef TAPROOT_COMMAND_SCHEDULER_HPP_
25#define TAPROOT_COMMAND_SCHEDULER_HPP_
122 bool masterScheduler =
false,
124 &CommandScheduler::defaultSafeDisconnectFunction);
332 return registeredSubsystemBitmap;
343 static constexpr float MAX_ALLOWABLE_SCHEDULER_RUNTIME = 100;
348 static constexpr int INVALID_ITER_INDEX = -1;
357 static int maxSubsystemIndex;
363 static Subsystem* globalSubsystemRegistrar[MAX_SUBSYSTEM_COUNT];
369 static int maxCommandIndex;
375 static Command* globalCommandRegistrar[MAX_COMMAND_COUNT];
380 static bool masterSchedulerExists;
386 bool safeDisconnected();
428 bool isMasterScheduler =
false;
Definition drivers.hpp:70
Definition command_scheduler.hpp:118
mockable SubsystemIterator subMapEnd()
Definition command_scheduler.cpp:466
mockable int countRunningHardwareTests()
Definition command_scheduler.cpp:400
mockable void runHardwareTest(const Subsystem *subsystem)
Definition command_scheduler.cpp:366
static void destructSubsystem(Subsystem *subsystem)
Definition command_scheduler.cpp:119
mockable void addCommand(Command *commandToAdd)
Definition command_scheduler.cpp:252
mockable CommandIterator cmdMapEnd()
Definition command_scheduler.cpp:456
mockable void runAllHardwareTests()
Definition command_scheduler.cpp:358
static int constructCommand(Command *command)
Definition command_scheduler.cpp:48
static int constructSubsystem(Subsystem *subsystem)
Definition command_scheduler.cpp:73
mockable void removeCommand(Command *command, bool interrupted)
Definition command_scheduler.cpp:305
mockable int commandListSize() const
Definition command_scheduler.cpp:438
mockable CommandIterator cmdMapBegin()
Definition command_scheduler.cpp:451
mockable bool isRunningTest(const Subsystem *subsystem)
Definition command_scheduler.cpp:414
mockable bool hasPassedTest(const Subsystem *subsystem)
Definition command_scheduler.cpp:419
mockable ~CommandScheduler()
Definition command_scheduler.cpp:160
mockable void registerSubsystem(Subsystem *subsystem)
Definition command_scheduler.cpp:333
mockable command_scheduler_bitmap_t getAddedCommandBitmap() const
Definition command_scheduler.hpp:334
mockable void stopHardwareTest(const Subsystem *subsystem)
Definition command_scheduler.cpp:391
mockable void stopAllHardwareTests()
Definition command_scheduler.cpp:377
mockable SubsystemIterator subMapBegin()
Definition command_scheduler.cpp:461
mockable subsystem_scheduler_bitmap_t getRegisteredSubsystemBitmap() const
Definition command_scheduler.hpp:330
mockable void setSafeDisconnectFunction(SafeDisconnectFunction *func)
Set the SafeDisconnectFunction to the given function.
Definition command_scheduler.cpp:326
mockable void run()
Definition command_scheduler.cpp:168
mockable bool isSubsystemRegistered(const Subsystem *subsystem) const
Definition command_scheduler.cpp:351
mockable int subsystemListSize() const
Definition command_scheduler.cpp:425
mockable bool isCommandScheduled(const Command *command) const
Definition command_scheduler.cpp:299
static void destructCommand(Command *command)
Definition command_scheduler.cpp:101
Definition command.hpp:44
Definition command_scheduler.hpp:52
virtual bool operator()()
Definition command_scheduler.hpp:55
SafeDisconnectFunction()
Definition command_scheduler.hpp:54
Definition subsystem.hpp:54
IUnit i
Definition dimensional_smooth_pid.hpp:2
uint64_t command_scheduler_bitmap_t
Definition command_scheduler_types.hpp:31
uint64_t subsystem_scheduler_bitmap_t
Definition command_scheduler_types.hpp:32
Definition ballistics.cpp:29
tap::Drivers Drivers
Definition drivers.hpp:11
fang::Drivers & drivers
Definition robot_singleton.cpp:45
Definition command_scheduler.hpp:271
std::ptrdiff_t difference_type
Definition command_scheduler.hpp:273
friend bool operator==(const CommandIterator &a, const CommandIterator &b)
Definition command_scheduler.cpp:527
CommandIterator & operator++()
Definition command_scheduler.cpp:497
pointer operator*()
Definition command_scheduler.cpp:492
std::forward_iterator_tag iterator_category
Definition command_scheduler.hpp:272
friend bool operator!=(const CommandIterator &a, const CommandIterator &b)
Definition command_scheduler.cpp:534
Definition command_scheduler.hpp:300
SubsystemIterator & operator++()
Definition command_scheduler.cpp:567
friend bool operator!=(const SubsystemIterator &a, const SubsystemIterator &b)
Definition command_scheduler.cpp:604
pointer operator*()
Definition command_scheduler.cpp:562
friend bool operator==(const SubsystemIterator &a, const SubsystemIterator &b)
Definition command_scheduler.cpp:597
std::forward_iterator_tag iterator_category
Definition command_scheduler.hpp:301
std::ptrdiff_t difference_type
Definition command_scheduler.hpp:302
#define mockable
Wrap class functions that are not already virtual in this function if you wish to mock them.
Definition util_macros.hpp:38
#define DISALLOW_COPY_AND_ASSIGN(Typename)
Definition util_macros.hpp:27