> For the complete documentation index, see [llms.txt](https://docs.revrobotics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.revrobotics.com/revlib/smart-sensors/maxspline-encoder.md).

# MAXSpline Encoder

The MAXSpline Encoder is represented by the `SplineEncoder` class and its parent class `DetachedEncoder`. This class allows the user to set the relative position. and obtain the Velocity, Relative Position, and Absolute Angle, depending on the user's needs.

Below is an example of how you construct a MAXSpline Encoder:

{% tabs %}
{% tab title="Java" %}

```java
SplineEncoder spline = new SplineEncoder(12);
```

{% endtab %}

{% tab title="C++" %}

```cpp
using namespace rev::detached;

SplineEncoder m_spline{12};
```

{% endtab %}
{% endtabs %}
