clearpath::horizon::payloads::Encoders Class Reference

Horizon Message Payload - Encoders. More...

Inheritance diagram for clearpath::horizon::payloads::Encoders:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
 Create A Horizon Message Payload - Encoders.
def get_count
 Get the number of Encoders.
def get_speed
 Get Speed.
def get_travel
 Get Distance.
def print_format
 Human Readable Payload String.

Properties

 speed = property(fget=get_speed, doc="Encoder Speed")
 Encoder Speed.
 travel = property(fget=get_travel, doc="Encoder Distance")
 Encoder Distance.

Private Attributes

 _speed
 Encoder Speeds.
 _travel
 Encoder Distances.

Detailed Description

Horizon Message Payload - Encoders.

Represents the payload of the data message 'encoders'

Warning:
Data should not be modified once created
Since:
0.1
Horizon Message Payload - Encoders

Definition at line 2816 of file payloads.py.


Member Function Documentation

def clearpath::horizon::payloads::Encoders::__init__ (   self,
  travel = [],
  speed = [],
  raw = None,
  timestamp = 0 
)

Create A Horizon Message Payload - Encoders.

Constructor for the Horizon Message Payload - Encoders.
The constructor can be called two different ways:

  • Encoders(travel, speed, raw=None, ...)
    Create a command message payload to send.
  • Encoders(raw, version, timestamp)
    Parse raw data (most likely received) into payload variables.
Parameters:
raw Raw Payload data byte list to parse
speed A list of encoder speeds
timestamp Payload Send / Create Time (milliseconds)
travel A list of encoder distances
version Horizon Protocol Version, (-1,*) represents the newest version, (0,0) auto-detect the version (if supported)
Exceptions:
LookupError If auto-detect version fails
ValueError If values are out of range or if raw is invalid
Create A Horizon Message Payload - Encoders

Definition at line 2840 of file payloads.py.

def clearpath::horizon::payloads::Encoders::get_count (   self  ) 

Get the number of Encoders.

Returns:
number of encoders
Get the number of Encoders.

Definition at line 2924 of file payloads.py.

def clearpath::horizon::payloads::Encoders::get_speed (   self,
  encoder = -1 
)

Get Speed.

Parameters:
encoder The encoder to get the speed of. If -1 then it returns a list of all encoders
Returns:
the encoder speed (m/s), or all encoder speeds
Get Encoder

Definition at line 2937 of file payloads.py.

def clearpath::horizon::payloads::Encoders::get_travel (   self,
  encoder = -1 
)

Get Distance.

Parameters:
encoder The encoder to get the distance of. If -1 then it returns a list of all encoders
Returns:
the distance of encoder (metres), or all encoder distances
Get Distance

Definition at line 2956 of file payloads.py.

def clearpath::horizon::payloads::Encoders::print_format (   self  ) 

Human Readable Payload String.

Return the payload as a human readable string

Reimplemented from clearpath::horizon::payloads::Payload.

Definition at line 2911 of file payloads.py.


Member Data Documentation

Encoder Speeds.

Definition at line 2845 of file payloads.py.

Encoder Distances.

Definition at line 2847 of file payloads.py.


Property Documentation

clearpath::horizon::payloads::Encoders::speed = property(fget=get_speed, doc="Encoder Speed") [static]

Encoder Speed.

Definition at line 2970 of file payloads.py.

clearpath::horizon::payloads::Encoders::travel = property(fget=get_travel, doc="Encoder Distance") [static]

Encoder Distance.

Definition at line 2972 of file payloads.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Properties


clearpath_base
Author(s): Mike Purvis
autogenerated on Fri Jan 11 10:11:34 2013