Encoder class abstract Components
Encoder represents a physical encoder.
For more information, see Encoder component.
- Inheritance
- Implementers
Constructors
- Encoder()
Properties
Methods
-
doCommand(
Map< String, dynamic> command) → Future<Map< String, dynamic> > -
Send/Receive arbitrary commands to the Resource
inherited
-
getGeometries(
{Map< String, dynamic> ? extra}) → Future<List< Geometry> > - Get all geometries associated with the Encoder
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
position(
{PositionType? positionType, Map< String, dynamic> ? extra}) → Future<(double, PositionType)> - Report the position of the encoder in ticks or degrees, and the position type. The value returned is a tuple containing two values. The first is the position of the encoder which can either be ticks since last zeroing for a relative encoder or degrees for an absolute encoder, and the second is the type of position the encoder returns (ticks or degrees). This method will raise an exception if position reporting is not supported by the encoder.
-
properties(
{Map< String, dynamic> ? extra}) → Future<EncoderProperties> - Report a dictionary mapping each optional property to whether it is supported by this encoder.
-
resetPosition(
{Map< String, dynamic> ? extra}) → Future<void> - Set the current position to be the new zero (home) position.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromRobot(
RobotClient robot, String name) → Encoder -
Get the Encoder named
namefrom the provided robot. -
getResourceName(
String name) → ResourceName -
Get the common_pb.ResourceName for this Encoder with the given
name.