Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
include.genpy.rostime.Duration Class Reference
Inheritance diagram for include.genpy.rostime.Duration:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __abs__
def __add__
def __cmp__
def __div__
def __eq__
def __floordiv__
def __getstate__
def __hash__
def __init__
def __mul__
def __neg__
def __repr__
def __setstate__
def __sub__
def __truediv__
def from_sec

Public Attributes

 nsecs
 secs

Static Public Attributes

tuple from_sec = staticmethod(from_sec)

Static Private Attributes

list __slots__ = ['secs', 'nsecs']

Detailed Description

Duration represents the ROS 'duration' primitive, which consists
of two integers: seconds and nanoseconds. The Duration class
allows you to add and subtract Duration instances, including
adding and subtracting from :class:`Time` instances.

Definition at line 294 of file rostime.py.


Constructor & Destructor Documentation

def include.genpy.rostime.Duration.__init__ (   self,
  secs = 0,
  nsecs = 0 
)
Create new Duration instance. secs and nsecs are integers and correspond to the ROS 'duration' primitive.

:param secs: seconds, ``int``
:param nsecs: nanoseconds, ``int``

Reimplemented from include.genpy.rostime.TVal.

Definition at line 302 of file rostime.py.


Member Function Documentation

Absolute value of this duration
:returns: positive :class:`Duration`

Definition at line 344 of file rostime.py.

def include.genpy.rostime.Duration.__add__ (   self,
  other 
)
Add duration to this duration, or this duration to a time, creating a new time value as a result.
:param other: duration or time, ``Duration``/``Time``
:returns: :class:`Duration` if other is a :class:`Duration`
  instance, :class:`Time` if other is a :class:`Time`

Definition at line 353 of file rostime.py.

def include.genpy.rostime.Duration.__cmp__ (   self,
  other 
)

Reimplemented from include.genpy.rostime.TVal.

Definition at line 431 of file rostime.py.

def include.genpy.rostime.Duration.__div__ (   self,
  val 
)
Divide this duration by an integer or float
:param val: division factor, ``int/float``
:returns: :class:`Duration` divided by val

Definition at line 404 of file rostime.py.

def include.genpy.rostime.Duration.__eq__ (   self,
  other 
)

Reimplemented from include.genpy.rostime.TVal.

Definition at line 441 of file rostime.py.

Floor divide this duration by an integer or float
:param val: division factor, ``int/float``
:returns: :class:`Duration` divided by val

Definition at line 390 of file rostime.py.

support for Python pickling

Definition at line 311 of file rostime.py.

Time values are hashable. Time values with identical fields have the same hash.

Reimplemented from include.genpy.rostime.TVal.

Definition at line 446 of file rostime.py.

def include.genpy.rostime.Duration.__mul__ (   self,
  val 
)
Multiply this duration by an integer or float
:param val: multiplication factor, ``int/float``
:returns: :class:`Duration` multiplied by val

Definition at line 376 of file rostime.py.

:returns: Negative value of this :class:`Duration`

Definition at line 339 of file rostime.py.

Reimplemented from include.genpy.rostime.TVal.

Definition at line 323 of file rostime.py.

def include.genpy.rostime.Duration.__setstate__ (   self,
  state 
)
support for Python pickling

Definition at line 317 of file rostime.py.

def include.genpy.rostime.Duration.__sub__ (   self,
  other 
)
Subtract duration from this duration, returning a new duration
:param other: duration
:returns: :class:`Duration`

Definition at line 366 of file rostime.py.

def include.genpy.rostime.Duration.__truediv__ (   self,
  val 
)
Divide this duration by an integer or float
:param val: division factor, ``int/float``
:returns: :class:`Duration` multiplied by val

Definition at line 420 of file rostime.py.

def include.genpy.rostime.Duration.from_sec (   float_seconds)
Create new Duration instance from float seconds format.

:param float_seconds: time value in specified as float seconds, ``float``
:returns: :class:`Duration` instance for specified float_seconds

Definition at line 326 of file rostime.py.


Member Data Documentation

list include::genpy::rostime.Duration::__slots__ = ['secs', 'nsecs'] [static, private]

Reimplemented from include.genpy.rostime.TVal.

Definition at line 301 of file rostime.py.

tuple include::genpy::rostime.Duration::from_sec = staticmethod(from_sec) [static]

Definition at line 337 of file rostime.py.

Reimplemented from include.genpy.rostime.TVal.

Definition at line 319 of file rostime.py.

Reimplemented from include.genpy.rostime.TVal.

Definition at line 441 of file rostime.py.


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


firos
Author(s): IƱigo Gonzalez, igonzalez@ikergune.com
autogenerated on Thu Jun 6 2019 17:51:04