CTRE Phoenix C++ 5.33.1
GroupMotorControllers.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
4#include "IMotorController.h"
5#include <vector>
6
7namespace ctre {
8namespace phoenix {
9namespace motorcontrol {
10
11/**
12 * Group of motor controllers
13 */
15public:
16 /**
17 * Add motor controller to the group
18 * @param motorController motor controller to add
19 */
20 static void Register(IMotorController *motorController);
21 /**
22 * @return number of motorcontrollers in group
23 */
24 static size_t MotorControllerCount();
25 /**
26 * @param idx Index of motor controller to get
27 * @return Motor controller at specified index
28 */
29 static IMotorController* Get(int idx);
30
31private:
32 static std::vector<IMotorController*> _mcs;
33};
34
35} // namespace motorcontrol
36} // namespace phoenix
37} // namespace ctre
38
Group of motor controllers.
Definition: GroupMotorControllers.h:14
static void Register(IMotorController *motorController)
Add motor controller to the group.
static IMotorController * Get(int idx)
Interface for motor controllers.
Definition: IMotorController.h:35
namespace ctre
Definition: paramEnum.h:5