CTRE Phoenix C++ 5.33.1
BufferedTrajectoryPointStream.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3#include <stdint.h>
7namespace ctre {
8 namespace phoenix {
9 namespace motion {
10 /**
11 * Stream of trajectory points for Talon/Victor motion profiling.
12 */
14 public:
19 /**
20 * @brief Clear all trajectory points.
21 * @return nonzero error code if operation fails.
22 */
24 /**
25 * @brief Write a single trajectory point into the buffer.
26 * @return nonzero error code if operation fails.
27 */
29 /**
30 * @brief Writes an array of trajectory point into the buffer.
31 * @return nonzero error code if operation fails.
32 */
33 ctre::phoenix::ErrorCode Write(const TrajectoryPoint * trajPts, uint32_t trajPtCount);
34 /**
35 * @return raw handle for resource management.
36 */
37 void * GetHandle() { return _handle; }
38 private:
39 void * _handle;
40 };
41 } // namespace motion
42 } // namespace phoenix
43} // namespace ctre
Stream of trajectory points for Talon/Victor motion profiling.
Definition: BufferedTrajectoryPointStream.h:13
BufferedTrajectoryPointStream & operator=(const BufferedTrajectoryPointStream &)=delete
ctre::phoenix::ErrorCode Write(const TrajectoryPoint *trajPts, uint32_t trajPtCount)
Writes an array of trajectory point into the buffer.
void * GetHandle()
Definition: BufferedTrajectoryPointStream.h:37
ctre::phoenix::ErrorCode Clear()
Clear all trajectory points.
BufferedTrajectoryPointStream(const BufferedTrajectoryPointStream &)=delete
ctre::phoenix::ErrorCode Write(const TrajectoryPoint &trajPt)
Write a single trajectory point into the buffer.
ErrorCode
Definition: ErrorCode.h:13
namespace ctre
Definition: paramEnum.h:5
Motion Profile Trajectory Point This is simply a data transfer object.
Definition: TrajectoryPoint.h:11