CTRE Phoenix C++ 5.33.1
VelocityMeasPeriod.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
4#include <string>
5
6namespace ctre {
7namespace phoenix {
8namespace motorcontrol {
9
10/**
11 * Velocity Measurement Periods
12 */
14 /**
15 * 1ms measurement period
16 */
18 /**
19 * 2ms measurement period
20 */
22 /**
23 * 5ms measurement period
24 */
26 /**
27 * 10ms measurement period
28 */
30 /**
31 * 20ms measurement period
32 */
34 /**
35 * 25ms measurement period
36 */
38 /**
39 * 50ms measurement period
40 */
42 /**
43 * 100ms measurement period
44 */
46};
47/**
48 * Class to handle routines specific to VelocityMeasPeriod
49 */
51public:
52 /**
53 * String representation of specified VelocityMeasPeriod
54 * @param value VelocityMeasPeriod to convert to a string
55 * @return string representation of VelocityMeasPeriod
56 */
57 static std::string toString(VelocityMeasPeriod value) {
58 switch(value) {
59 case VelocityMeasPeriod::Period_1Ms : return "VelocityMeasPeriod::Period_1Ms";
60 case VelocityMeasPeriod::Period_2Ms : return "VelocityMeasPeriod::Period_2Ms";
61 case VelocityMeasPeriod::Period_5Ms : return "VelocityMeasPeriod::Period_5Ms";
62 case VelocityMeasPeriod::Period_10Ms : return "VelocityMeasPeriod::Period_10Ms";
63 case VelocityMeasPeriod::Period_20Ms : return "VelocityMeasPeriod::Period_20Ms";
64 case VelocityMeasPeriod::Period_25Ms : return "VelocityMeasPeriod::Period_25Ms";
65 case VelocityMeasPeriod::Period_50Ms : return "VelocityMeasPeriod::Period_50Ms";
66 case VelocityMeasPeriod::Period_100Ms : return "VelocityMeasPeriod::Period_100Ms";
67 default : return "InvalidValue";
68 }
69 }
70};
71} // namespace motorcontrol
72} // namespace phoenix
73} // namespace ctre
Class to handle routines specific to VelocityMeasPeriod.
Definition: VelocityMeasPeriod.h:50
static std::string toString(VelocityMeasPeriod value)
String representation of specified VelocityMeasPeriod.
Definition: VelocityMeasPeriod.h:57
VelocityMeasPeriod
Velocity Measurement Periods.
Definition: VelocityMeasPeriod.h:13
@ Period_2Ms
2ms measurement period
Definition: VelocityMeasPeriod.h:21
@ Period_10Ms
10ms measurement period
Definition: VelocityMeasPeriod.h:29
@ Period_20Ms
20ms measurement period
Definition: VelocityMeasPeriod.h:33
@ Period_25Ms
25ms measurement period
Definition: VelocityMeasPeriod.h:37
@ Period_1Ms
1ms measurement period
Definition: VelocityMeasPeriod.h:17
@ Period_100Ms
100ms measurement period
Definition: VelocityMeasPeriod.h:45
@ Period_5Ms
5ms measurement period
Definition: VelocityMeasPeriod.h:25
@ Period_50Ms
50ms measurement period
Definition: VelocityMeasPeriod.h:41
namespace ctre
Definition: paramEnum.h:5