CTRE Phoenix C++ 5.33.1
SensorVelocityMeasPeriod.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 {
7 namespace phoenix {
8 namespace sensors {
9
10 /**
11 * Enumerate filter periods for any sensor that measures velocity.
12 */
14 /**
15 * 1ms velocity measurement period
16 */
18 /**
19 * 2ms velocity measurement period
20 */
22 /**
23 * 5ms velocity measurement period
24 */
26 /**
27 * 10ms velocity measurement period
28 */
30 /**
31 * 20ms velocity measurement period
32 */
34 /**
35 * 25ms velocity measurement period
36 */
38 /**
39 * 50ms velocity measurement period
40 */
42 /**
43 * 100ms velocity measurement period
44 */
46 };
47
48 /**
49 * Class to handle routines specific to VelocityMeasPeriod
50 */
52 public:
53 /**
54 * String representation of specified CANCoderVelocityMeasPeriod
55 * @param value CANCoderVelocityMeasPeriod to convert to a string
56 * @return string representation of CANCoderVelocityMeasPeriod
57 */
58 static std::string toString(SensorVelocityMeasPeriod value) {
59 switch (value) {
60 case Period_1Ms: return "Period_1Ms";
61 case Period_2Ms: return "Period_2Ms";
62 case Period_5Ms: return "Period_5Ms";
63 case Period_10Ms: return "Period_10Ms";
64 case Period_20Ms: return "Period_20Ms";
65 case Period_25Ms: return "Period_25Ms";
66 case Period_50Ms: return "Period_50Ms";
67 case Period_100Ms: return "Period_100Ms";
68 default: return "InvalidValue";
69 }
70 }
71 };
72
73 } // namespace sensors
74 } // namespace phoenix
75} // namespace ctre
Class to handle routines specific to VelocityMeasPeriod.
Definition: SensorVelocityMeasPeriod.h:51
static std::string toString(SensorVelocityMeasPeriod value)
String representation of specified CANCoderVelocityMeasPeriod.
Definition: SensorVelocityMeasPeriod.h:58
SensorVelocityMeasPeriod
Enumerate filter periods for any sensor that measures velocity.
Definition: SensorVelocityMeasPeriod.h:13
@ Period_50Ms
50ms velocity measurement period
Definition: SensorVelocityMeasPeriod.h:41
@ Period_2Ms
2ms velocity measurement period
Definition: SensorVelocityMeasPeriod.h:21
@ Period_10Ms
10ms velocity measurement period
Definition: SensorVelocityMeasPeriod.h:29
@ Period_20Ms
20ms velocity measurement period
Definition: SensorVelocityMeasPeriod.h:33
@ Period_1Ms
1ms velocity measurement period
Definition: SensorVelocityMeasPeriod.h:17
@ Period_5Ms
5ms velocity measurement period
Definition: SensorVelocityMeasPeriod.h:25
@ Period_25Ms
25ms velocity measurement period
Definition: SensorVelocityMeasPeriod.h:37
@ Period_100Ms
100ms velocity measurement period
Definition: SensorVelocityMeasPeriod.h:45
namespace ctre
Definition: paramEnum.h:5