40 lines
1010 B
Python
40 lines
1010 B
Python
#
|
|
# Generated by erpcgen 1.14.0 on Tue Apr 28 12:25:26 2026.
|
|
#
|
|
# AUTOGENERATED - DO NOT EDIT
|
|
#
|
|
|
|
|
|
# Enumerators data types declarations
|
|
class RpcMotionMode:
|
|
RpcMotionModeImmediate = 0
|
|
RpcMotionModeSCurve = 1
|
|
RpcMotionModeFollow = 2
|
|
|
|
|
|
# Structures data types declarations
|
|
class ServoCmd(object):
|
|
def __init__(self, id=None, angle_rad=None):
|
|
self.id = id # string
|
|
self.angle_rad = angle_rad # float
|
|
|
|
def _read(self, codec):
|
|
self.id = codec.read_string()
|
|
self.angle_rad = codec.read_float()
|
|
return self
|
|
|
|
def _write(self, codec):
|
|
if self.id is None:
|
|
raise ValueError("id is None")
|
|
codec.write_string(self.id)
|
|
if self.angle_rad is None:
|
|
raise ValueError("angle_rad is None")
|
|
codec.write_float(self.angle_rad)
|
|
|
|
def __str__(self):
|
|
return "<%s@%x id=%s angle_rad=%s>" % (self.__class__.__name__, id(self), self.id, self.angle_rad)
|
|
|
|
def __repr__(self):
|
|
return self.__str__()
|
|
|