DifferentialWheelMotorDsl

io.github.srs.model.entity.dynamicentity.actuator.dsl.DifferentialWheelMotorDsl

DSL for creating and configuring a DifferentialWheelMotor. Provides methods to set the speed of the motor.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Creates a new instance of DifferentialWheelMotor with default wheels.

Creates a new instance of DifferentialWheelMotor with default wheels.

Attributes

Validates a DifferentialWheelMotor to ensure it meets the domain constraints.

Validates a DifferentialWheelMotor to ensure it meets the domain constraints.

Value parameters

motor

the DifferentialWheelMotor to validate.

Attributes

Returns

Right if the motor is valid, or Left with a validation error.

Extensions

Extensions

extension (motor: DifferentialWheelMotor)

Validates the differential wheel motor to ensure it meets the domain constraints.

Validates the differential wheel motor to ensure it meets the domain constraints.

Attributes

Returns

Right if the motor is valid, or Left with a validation error.

infix def withLeftSpeed(speed: Double): DifferentialWheelMotor

Sets the speed of the left wheel of the differential motor.

Sets the speed of the left wheel of the differential motor.

Value parameters

speed

the speed to set for the left wheel.

Attributes

Returns

a new DifferentialWheelMotor instance with the updated left wheel speed.

infix def withRightSpeed(speed: Double): DifferentialWheelMotor

Sets the speed of the right wheel of the differential motor.

Sets the speed of the right wheel of the differential motor.

Value parameters

speed

the speed to set for the right wheel.

Attributes

Returns

a new DifferentialWheelMotor instance with the updated right wheel speed.

infix def withSpeed(speed: Double): DifferentialWheelMotor

Sets the speed of the left wheel of the differential motor.

Sets the speed of the left wheel of the differential motor.

Value parameters

speed

the speed to set for both wheels.

Attributes

Returns

a new DifferentialWheelMotor instance with the updated speed.

infix def ws(speed: Double): DifferentialWheelMotor

Sets the speed of both wheels of the differential motor.

Sets the speed of both wheels of the differential motor.

Value parameters

speed

the speed to set for both wheels.

Attributes

Returns

a new DifferentialWheelMotor instance with the updated speed.