viam.proto.component.switch

@generated by Viam. Do not edit manually!

Classes

SwitchServiceBase

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

SwitchServiceStub

UnimplementedSwitchServiceBase

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

GetNumberOfPositionsRequest

Abstract base class for protocol messages.

GetNumberOfPositionsResponse

Abstract base class for protocol messages.

GetPositionRequest

Abstract base class for protocol messages.

GetPositionResponse

Abstract base class for protocol messages.

SetPositionRequest

Abstract base class for protocol messages.

SetPositionResponse

Abstract base class for protocol messages.

Package Contents

class viam.proto.component.switch.SwitchServiceBase[source]

Bases: abc.ABC

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

abstract SetPosition(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.SetPositionRequest, component.switch.v1.switch_pb2.SetPositionResponse]) None[source]
Async:

abstract GetPosition(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.GetPositionRequest, component.switch.v1.switch_pb2.GetPositionResponse]) None[source]
Async:

abstract GetNumberOfPositions(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.GetNumberOfPositionsRequest, component.switch.v1.switch_pb2.GetNumberOfPositionsResponse]) None[source]
Async:

abstract DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
Async:

__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.component.switch.SwitchServiceStub(channel: grpclib.client.Channel)[source]
SetPosition
GetPosition
GetNumberOfPositions
DoCommand
class viam.proto.component.switch.UnimplementedSwitchServiceBase[source]

Bases: SwitchServiceBase

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

async SetPosition(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.SetPositionRequest, component.switch.v1.switch_pb2.SetPositionResponse]) None[source]
async GetPosition(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.GetPositionRequest, component.switch.v1.switch_pb2.GetPositionResponse]) None[source]
async GetNumberOfPositions(stream: grpclib.server.Stream[component.switch.v1.switch_pb2.GetNumberOfPositionsRequest, component.switch.v1.switch_pb2.GetNumberOfPositionsResponse]) None[source]
async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
class viam.proto.component.switch.GetNumberOfPositionsRequest(*, 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.

name: str
property extra: google.protobuf.struct_pb2.Struct
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.switch.GetNumberOfPositionsResponse(*, number_of_positions: int = ...)

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.

number_of_positions: int
class viam.proto.component.switch.GetPositionRequest(*, 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.

name: str
property extra: google.protobuf.struct_pb2.Struct
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.switch.GetPositionResponse(*, position: int = ...)

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.

position: int
class viam.proto.component.switch.SetPositionRequest(*, name: str = ..., position: int = ..., 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.

name: str
position: int
property extra: google.protobuf.struct_pb2.Struct
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.switch.SetPositionResponse

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.