# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.revrobotics.com/revlib/smart-sensors/maxspline-encoder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
