viam.module.service

Classes

AddResourceRequest

Abstract base class for protocol messages.

AddResourceResponse

Abstract base class for protocol messages.

ModuleServiceBase

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

ReadyRequest

Abstract base class for protocol messages.

ReadyResponse

Abstract base class for protocol messages.

ReconfigureResourceRequest

Abstract base class for protocol messages.

ReconfigureResourceResponse

Abstract base class for protocol messages.

RemoveResourceRequest

Abstract base class for protocol messages.

RemoveResourceResponse

Abstract base class for protocol messages.

ValidateConfigRequest

Abstract base class for protocol messages.

ValidateConfigResponse

Abstract base class for protocol messages.

ModuleRPCService

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

Module Contents

class viam.module.service.AddResourceRequest(*, config: viam.gen.app.v1.robot_pb2.ComponentConfig | None = ..., dependencies: collections.abc.Iterable[str] | 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 config: viam.gen.app.v1.robot_pb2.ComponentConfig
property dependencies: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
HasField(field_name: Literal['config', b'config']) 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.module.service.AddResourceResponse

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.module.service.ModuleServiceBase[source]

Bases: abc.ABC

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

abstract AddResource(stream: grpclib.server.Stream[module.v1.module_pb2.AddResourceRequest, module.v1.module_pb2.AddResourceResponse]) None[source]
Async:

abstract ReconfigureResource(stream: grpclib.server.Stream[module.v1.module_pb2.ReconfigureResourceRequest, module.v1.module_pb2.ReconfigureResourceResponse]) None[source]
Async:

abstract RemoveResource(stream: grpclib.server.Stream[module.v1.module_pb2.RemoveResourceRequest, module.v1.module_pb2.RemoveResourceResponse]) None[source]
Async:

abstract Ready(stream: grpclib.server.Stream[module.v1.module_pb2.ReadyRequest, module.v1.module_pb2.ReadyResponse]) None[source]
Async:

abstract ValidateConfig(stream: grpclib.server.Stream[module.v1.module_pb2.ValidateConfigRequest, module.v1.module_pb2.ValidateConfigResponse]) None[source]
Async:

__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.module.service.ReadyRequest(*, parent_address: str = ..., webrtc_offer: 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.

parent_address: str
webrtc_offer: str
class viam.module.service.ReadyResponse(*, ready: bool = ..., handlermap: global___HandlerMap | None = ..., webrtc_answer: 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.

ready: bool
webrtc_answer: str
property handlermap: global___HandlerMap
HasField(field_name: Literal['handlermap', b'handlermap']) 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.module.service.ReconfigureResourceRequest(*, config: viam.gen.app.v1.robot_pb2.ComponentConfig | None = ..., dependencies: collections.abc.Iterable[str] | 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 config: viam.gen.app.v1.robot_pb2.ComponentConfig
property dependencies: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
HasField(field_name: Literal['config', b'config']) 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.module.service.ReconfigureResourceResponse

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.module.service.RemoveResourceRequest(*, 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.module.service.RemoveResourceResponse

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.module.service.ValidateConfigRequest(*, config: viam.gen.app.v1.robot_pb2.ComponentConfig | 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 config: viam.gen.app.v1.robot_pb2.ComponentConfig
HasField(field_name: Literal['config', b'config']) 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.module.service.ValidateConfigResponse(*, dependencies: collections.abc.Iterable[str] | 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 dependencies: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
class viam.module.service.ModuleRPCService(module: viam.module.module.Module)[source]

Bases: viam.proto.module.ModuleServiceBase

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

async AddResource(stream: grpclib.server.Stream[viam.proto.module.AddResourceRequest, viam.proto.module.AddResourceResponse]) None[source]
async ReconfigureResource(stream: grpclib.server.Stream[viam.proto.module.ReconfigureResourceRequest, viam.proto.module.ReconfigureResourceResponse]) None[source]
async RemoveResource(stream: grpclib.server.Stream[viam.proto.module.RemoveResourceRequest, viam.proto.module.RemoveResourceResponse]) None[source]
async Ready(stream: grpclib.server.Stream[viam.proto.module.ReadyRequest, viam.proto.module.ReadyResponse]) None[source]
async ValidateConfig(stream: grpclib.server.Stream[viam.proto.module.ValidateConfigRequest, viam.proto.module.ValidateConfigResponse]) None[source]