Horizon Message Payload - Encoders. More...
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. |
Horizon Message Payload - Encoders.
Represents the payload of the data message 'encoders'
Horizon Message Payload - Encoders
Definition at line 2816 of file payloads.py.
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:
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) |
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.
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.
encoder | The encoder to get the speed of. If -1 then it returns a list of all encoders |
Get Encoder
Definition at line 2937 of file payloads.py.
def clearpath.horizon.payloads.Encoders.get_travel | ( | self, | |
encoder = -1 |
|||
) |
Get Distance.
encoder | The encoder to get the distance of. If -1 then it returns a list of all encoders |
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.
Encoder Speeds.
Definition at line 2841 of file payloads.py.
Encoder Distances.
Definition at line 2842 of file payloads.py.
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.