clearpath::horizon::payloads::Payload Class Reference

Horizon Payload. 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.

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.


Member Function 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:
raw Raw data buffer to parse
timestamp Payload Send / Create Time (milliseconds)
Exceptions:
LookupError If auto-detect version fails
ValueError If values are out of range or if raw is invalid
Create A Horizon Message Payload

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

Definition at line 211 of file payloads.py.

def clearpath::horizon::payloads::Payload::__str__ (   self  ) 

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.

def clearpath::horizon::payloads::Payload::copy (   self  ) 

Copy Instance.

Returns:
A deep copy of this object
Copy Instance

Definition at line 241 of file payloads.py.

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

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

Definition at line 259 of file payloads.py.

def clearpath::horizon::payloads::Payload::raw_string (   self  ) 

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

Definition at line 216 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:35 2013