Class ServoRPCClient


public class ServoRPCClient extends Servo
  • Constructor Details

    • ServoRPCClient

      public ServoRPCClient(String name, Channel chan)
  • Method Details

    • doCommand

      public com.google.protobuf.Struct doCommand(Map<String,com.google.protobuf.Value> command)
      Description copied from class: Resource
      Send/Receive arbitrary commands to the Resource
      Overrides:
      doCommand in class Resource
      Parameters:
      command - the command to execute
      Returns:
      result of the executed command
    • move

      public void move(int angle, com.google.protobuf.Struct extra)
      Description copied from class: Servo
      Move the servo to the provided angle.
      Specified by:
      move in class Servo
      Parameters:
      angle - the desired angle of the servo in degrees
    • getPosition

      public int getPosition(com.google.protobuf.Struct extra)
      Description copied from class: Servo
      Get the current angle (degrees) of the servo.
      Specified by:
      getPosition in class Servo
      Returns:
      the current angle of the servo in degrees
    • stop

      public void stop(com.google.protobuf.Struct extra)
      Description copied from class: Servo
      Stop the servo. It is assumed that the servo stops immediately.
      Specified by:
      stop in class Servo
    • isMoving

      public boolean isMoving()
      Description copied from class: Servo
      Get if the servo is currently moving.
      Specified by:
      isMoving in class Servo
      Returns:
      whether the servo is moving
    • getGeometries

      public List<Common.Geometry> getGeometries(Optional<com.google.protobuf.Struct> extra)
      Description copied from class: Component
      Get all geometries associated with the Component, in their current configuration, in the frame of the Component.
      Overrides:
      getGeometries in class Component
      Returns:
      the geometries associated with the Component