Public Member Functions | Properties | Private Attributes
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.


Constructor & Destructor 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:
rawRaw Payload data byte list to parse
speedA list of encoder speeds
timestampPayload Send / Create Time (milliseconds)
travelA list of encoder distances
versionHorizon Protocol Version, (-1,*) represents the newest version, (0,0) auto-detect the version (if supported)
Exceptions:
LookupErrorIf auto-detect version fails
ValueErrorIf values are out of range or if raw is invalid
Create A Horizon Message Payload - Encoders

Definition at line 2840 of file payloads.py.


Member Function Documentation

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:
encoderThe 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:
encoderThe 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.

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 2841 of file payloads.py.

Encoder Distances.

Definition at line 2842 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:


clearpath_base
Author(s): Mike Purvis
autogenerated on Sun Oct 5 2014 22:52:08