rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
Loading...
Searching...
No Matches
rosros.rclify.parameter.IntegerRange Class Reference

Represents bounds and a step value for an integer typed parameter. More...

Public Member Functions

 __init__ (self, from_value=0, to_value=0, step=0)
 A step value of zero implies a continuous range of values.
 

Public Attributes

 from_value
 Start value for valid values, inclusive.
 
 step
 Size of valid steps between the from and to bound.
 
 to_value
 End value for valid values, inclusive.
 

Detailed Description

Represents bounds and a step value for an integer typed parameter.

Stand-in for ROS2 `rcl_interfaces.msg.IntegerRange` in ROS1.

Definition at line 297 of file parameter.py.

Constructor & Destructor Documentation

◆ __init__()

rosros.rclify.parameter.IntegerRange.__init__ (   self,
  from_value = 0,
  to_value = 0,
  step = 0 
)

A step value of zero implies a continuous range of values.

Ideally, the step would be less than or equal to the distance between the bounds, as well as an even multiple of the distance between the bounds, but neither are required.

If the absolute value of the step is larger than or equal to the distance between the two bounds, then the bounds will be the only valid values. e.g. if the range is defined as {from_value: 1, to_value: 2, step: 5} then the valid values will be 1 and 2.

If the step is less than the distance between the bounds, but the distance is not a multiple of the step, then the "to" bound will always be a valid value, e.g. if the range is defined as {from_value: 2, to_value: 5, step: 2} then the valid values will be 2, 4, and 5.

Definition at line 298 of file parameter.py.

Member Data Documentation

◆ from_value

rosros.rclify.parameter.IntegerRange.from_value

Start value for valid values, inclusive.

Definition at line 300 of file parameter.py.

◆ step

rosros.rclify.parameter.IntegerRange.step

Size of valid steps between the from and to bound.

Definition at line 304 of file parameter.py.

◆ to_value

rosros.rclify.parameter.IntegerRange.to_value

End value for valid values, inclusive.

Definition at line 302 of file parameter.py.


The documentation for this class was generated from the following file: