viam.proto.component.base

@generated by Viam. Do not edit manually!

Package Contents

Classes

BaseServiceBase

Helper class that provides a standard way to create an ABC using

BaseServiceStub

GetPropertiesRequest

Abstract base class for protocol messages.

GetPropertiesResponse

Abstract base class for protocol messages.

IsMovingRequest

Abstract base class for protocol messages.

IsMovingResponse

Abstract base class for protocol messages.

MoveStraightRequest

Abstract base class for protocol messages.

MoveStraightResponse

Abstract base class for protocol messages.

SetPowerRequest

Abstract base class for protocol messages.

SetPowerResponse

Abstract base class for protocol messages.

SetVelocityRequest

Abstract base class for protocol messages.

SetVelocityResponse

Abstract base class for protocol messages.

SpinRequest

Abstract base class for protocol messages.

SpinResponse

Abstract base class for protocol messages.

StopRequest

Abstract base class for protocol messages.

StopResponse

Abstract base class for protocol messages.

class viam.proto.component.base.BaseServiceBase[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract async MoveStraight(stream: grpclib.server.Stream[component.base.v1.base_pb2.MoveStraightRequest, component.base.v1.base_pb2.MoveStraightResponse]) None[source]
abstract async Spin(stream: grpclib.server.Stream[component.base.v1.base_pb2.SpinRequest, component.base.v1.base_pb2.SpinResponse]) None[source]
abstract async SetPower(stream: grpclib.server.Stream[component.base.v1.base_pb2.SetPowerRequest, component.base.v1.base_pb2.SetPowerResponse]) None[source]
abstract async SetVelocity(stream: grpclib.server.Stream[component.base.v1.base_pb2.SetVelocityRequest, component.base.v1.base_pb2.SetVelocityResponse]) None[source]
abstract async Stop(stream: grpclib.server.Stream[component.base.v1.base_pb2.StopRequest, component.base.v1.base_pb2.StopResponse]) None[source]
abstract async IsMoving(stream: grpclib.server.Stream[component.base.v1.base_pb2.IsMovingRequest, component.base.v1.base_pb2.IsMovingResponse]) None[source]
abstract async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
abstract async GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) None[source]
abstract async GetProperties(stream: grpclib.server.Stream[component.base.v1.base_pb2.GetPropertiesRequest, component.base.v1.base_pb2.GetPropertiesResponse]) None[source]
__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.component.base.BaseServiceStub(channel: grpclib.client.Channel)[source]
class viam.proto.component.base.GetPropertiesRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property extra: google.protobuf.struct_pb2.Struct
name: str

Name of the base

HasField(field_name: Literal[extra, b'extra']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.component.base.GetPropertiesResponse(*, width_meters: float = ..., turning_radius_meters: float = ..., wheel_circumference_meters: float = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

width_meters: float
turning_radius_meters: float
wheel_circumference_meters: float
class viam.proto.component.base.IsMovingRequest(*, name: str = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

name: str
class viam.proto.component.base.IsMovingResponse(*, is_moving: bool = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

is_moving: bool
class viam.proto.component.base.MoveStraightRequest(*, name: str = ..., distance_mm: int = ..., mm_per_sec: float = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a base

distance_mm: int

Desired travel distance in millimeters

mm_per_sec: float

Desired travel velocity in millimeters/second

HasField(field_name: Literal[extra, b'extra']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.component.base.MoveStraightResponse

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

class viam.proto.component.base.SetPowerRequest(*, name: str = ..., linear: viam.gen.common.v1.common_pb2.Vector3 | None = ..., angular: viam.gen.common.v1.common_pb2.Vector3 | None = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property linear: viam.gen.common.v1.common_pb2.Vector3

Desired linear power percentage as -1 -> 1

property angular: viam.gen.common.v1.common_pb2.Vector3

Desired angular power percentage % as -1 -> 1

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a base

HasField(field_name: Literal[angular, b'angular', extra, b'extra', linear, b'linear']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.component.base.SetPowerResponse

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

class viam.proto.component.base.SetVelocityRequest(*, name: str = ..., linear: viam.gen.common.v1.common_pb2.Vector3 | None = ..., angular: viam.gen.common.v1.common_pb2.Vector3 | None = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property linear: viam.gen.common.v1.common_pb2.Vector3

Desired linear velocity in mm per second

property angular: viam.gen.common.v1.common_pb2.Vector3

Desired angular velocity in degrees per second

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a base

HasField(field_name: Literal[angular, b'angular', extra, b'extra', linear, b'linear']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.component.base.SetVelocityResponse

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

class viam.proto.component.base.SpinRequest(*, name: str = ..., angle_deg: float = ..., degs_per_sec: float = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a base

angle_deg: float

Desired angle

degs_per_sec: float

Desired angular velocity

HasField(field_name: Literal[extra, b'extra']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.component.base.SpinResponse

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

class viam.proto.component.base.StopRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

name: str

Name of a base

HasField(field_name: Literal[extra, b'extra']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.component.base.StopResponse

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.