Public Member Functions | Public Attributes
clearpath.horizon.payloads.Payload Class Reference

Horizon Payload Superclass. More...

Inheritance diagram for clearpath.horizon.payloads.Payload:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
 Create A Horizon Message Payload.
def __str__
 Hex String Representation.
def copy
 Copy Instance.
def print_format
 Human Readable Payload String.
def raw_string
 Raw Bytes Payload Representation.

Public Attributes

 data
 timestamp

Detailed Description

Horizon Payload Superclass.

Horizon Payload

Represents the basic payload of a Horizon message.
To be inherited for specific message payloads.

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

Definition at line 194 of file payloads.py.


Constructor & Destructor Documentation

def clearpath.horizon.payloads.Payload.__init__ (   self,
  raw = [],
  timestamp = 0 
)

Create A Horizon Message Payload.

Constructor for the Horizon Payload class.
Creates a basic message payload which is simply a byte list.

Subclass overrides should throw ValueError if invalid format and LookupError if it has version detection problems (if supported).

Parameters:
rawRaw data buffer to parse
timestampPayload Send / Create Time (milliseconds)
Exceptions:
LookupErrorIf auto-detect version fails
ValueErrorIf values are out of range or if raw is invalid
Create A Horizon Message Payload

Reimplemented in clearpath.horizon.payloads.RawMagnetometer, clearpath.horizon.payloads.RawAccelerometer, clearpath.horizon.payloads.RawOrientationSensor, clearpath.horizon.payloads.RawTemperatureSensor, clearpath.horizon.payloads.RawVoltageSensor, clearpath.horizon.payloads.RawCurrentSensor, clearpath.horizon.payloads.RawSensor, clearpath.horizon.payloads.Reset, clearpath.horizon.payloads.ProcessorStatus, clearpath.horizon.payloads.Echo, and clearpath.horizon.payloads.Null.

Definition at line 211 of file payloads.py.


Member Function Documentation

Hex String Representation.

Return the entire payload in a string of hex characters.

Returns:
String of hex info
Return the entire payload in a string of hex characters.

Definition at line 231 of file payloads.py.

Copy Instance.

Returns:
A deep copy of this object
Copy Instance

Definition at line 241 of file payloads.py.

Human Readable Payload String.

Returns:
Human readable string representation of the payload
Return the payload as a human readable string

Reimplemented in clearpath.horizon.payloads.ConfigRequest, clearpath.horizon.payloads.Config, clearpath.horizon.payloads.PlatformKinematics, clearpath.horizon.payloads.BatteryEstimationConfig, clearpath.horizon.payloads.ControlFlags, clearpath.horizon.payloads.StoreSystemConfig, clearpath.horizon.payloads.RestoreSystemConfig, clearpath.horizon.payloads.RawMagnetometer, clearpath.horizon.payloads.RawAccelerometer, clearpath.horizon.payloads.RawOrientationSensor, clearpath.horizon.payloads.RawTemperatureSensor, clearpath.horizon.payloads.RawVoltageSensor, clearpath.horizon.payloads.RawCurrentSensor, clearpath.horizon.payloads.EncodersConfig, clearpath.horizon.payloads.AccelerometerConfig, clearpath.horizon.payloads.OrientationSensorConfig, clearpath.horizon.payloads.TemperatureSensorConfig, clearpath.horizon.payloads.VoltageSensorConfig, clearpath.horizon.payloads.CurrentSensorConfig, clearpath.horizon.payloads.Reset, clearpath.horizon.payloads.RawEncoders, clearpath.horizon.payloads.Encoders, clearpath.horizon.payloads.Magnetometer, clearpath.horizon.payloads.Acceleration, clearpath.horizon.payloads.Rotation, clearpath.horizon.payloads.Orientation, clearpath.horizon.payloads.DistanceTiming, clearpath.horizon.payloads.Distance, clearpath.horizon.payloads.GearStatus, clearpath.horizon.payloads.Gear, clearpath.horizon.payloads.MaxAccel, clearpath.horizon.payloads.MaxSpeed, clearpath.horizon.payloads.Turn, clearpath.horizon.payloads.Velocity, clearpath.horizon.payloads.AckermannOutput, clearpath.horizon.payloads.DifferentialOutput, clearpath.horizon.payloads.DifferentialControl, clearpath.horizon.payloads.DifferentialSpeed, clearpath.horizon.payloads.SafetyStatus, clearpath.horizon.payloads.ProcessorStatus, clearpath.horizon.payloads.PowerStatus, clearpath.horizon.payloads.SystemStatus, clearpath.horizon.payloads.FirmwareInfo, clearpath.horizon.payloads.PlatformTime, clearpath.horizon.payloads.PlatformName, clearpath.horizon.payloads.PlatformInfo, clearpath.horizon.payloads.Echo, clearpath.horizon.payloads.Subscribe, clearpath.horizon.payloads.Ack, and clearpath.horizon.payloads.Null.

Definition at line 259 of file payloads.py.

Raw Bytes Payload Representation.

Convert the payload into raw bytes (character string for Python 2.x) useful for writing to devices.

Returns:
raw bytes
Returns the data converted into raw bytes.

Definition at line 273 of file payloads.py.


Member Data Documentation

Definition at line 211 of file payloads.py.

Definition at line 211 of file payloads.py.


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


clearpath_base
Author(s): Mike Purvis
autogenerated on Sat Dec 28 2013 16:50:48