viam.proto.component.powersensor

@generated by Viam. Do not edit manually!

Classes

PowerSensorServiceBase

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

PowerSensorServiceStub

UnimplementedPowerSensorServiceBase

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

GetCurrentRequest

Abstract base class for protocol messages.

GetCurrentResponse

Abstract base class for protocol messages.

GetPowerRequest

Abstract base class for protocol messages.

GetPowerResponse

Abstract base class for protocol messages.

GetVoltageRequest

Abstract base class for protocol messages.

GetVoltageResponse

Abstract base class for protocol messages.

Package Contents

class viam.proto.component.powersensor.PowerSensorServiceBase[source]

Bases: abc.ABC

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

abstract GetVoltage(stream: grpclib.server.Stream[component.powersensor.v1.powersensor_pb2.GetVoltageRequest, component.powersensor.v1.powersensor_pb2.GetVoltageResponse]) None[source]
Async:

abstract GetCurrent(stream: grpclib.server.Stream[component.powersensor.v1.powersensor_pb2.GetCurrentRequest, component.powersensor.v1.powersensor_pb2.GetCurrentResponse]) None[source]
Async:

abstract GetPower(stream: grpclib.server.Stream[component.powersensor.v1.powersensor_pb2.GetPowerRequest, component.powersensor.v1.powersensor_pb2.GetPowerResponse]) None[source]
Async:

abstract GetReadings(stream: grpclib.server.Stream[common.v1.common_pb2.GetReadingsRequest, common.v1.common_pb2.GetReadingsResponse]) 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.powersensor.PowerSensorServiceStub(channel: grpclib.client.Channel)[source]
GetVoltage
GetCurrent
GetPower
GetReadings
DoCommand
class viam.proto.component.powersensor.UnimplementedPowerSensorServiceBase[source]

Bases: PowerSensorServiceBase

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

async GetVoltage(stream: grpclib.server.Stream[component.powersensor.v1.powersensor_pb2.GetVoltageRequest, component.powersensor.v1.powersensor_pb2.GetVoltageResponse]) None[source]
async GetCurrent(stream: grpclib.server.Stream[component.powersensor.v1.powersensor_pb2.GetCurrentRequest, component.powersensor.v1.powersensor_pb2.GetCurrentResponse]) None[source]
async GetPower(stream: grpclib.server.Stream[component.powersensor.v1.powersensor_pb2.GetPowerRequest, component.powersensor.v1.powersensor_pb2.GetPowerResponse]) None[source]
async GetReadings(stream: grpclib.server.Stream[common.v1.common_pb2.GetReadingsRequest, common.v1.common_pb2.GetReadingsResponse]) None[source]
async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
class viam.proto.component.powersensor.GetCurrentRequest(*, 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

Name of a power sensor

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

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.powersensor.GetCurrentResponse(*, amperes: float = ..., is_ac: 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.

amperes: float

Current in amperes

is_ac: bool

Bool descibing whether the current is DC or AC

class viam.proto.component.powersensor.GetPowerRequest(*, 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

Name of a power sensor

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

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.powersensor.GetPowerResponse(*, watts: 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.

watts: float

Power in watts

class viam.proto.component.powersensor.GetVoltageRequest(*, 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

Name of a power sensor

property extra: google.protobuf.struct_pb2.Struct

Additional arguments to the method

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.powersensor.GetVoltageResponse(*, volts: float = ..., is_ac: 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.

volts: float

Voltage in volts

is_ac: bool

Bool describing whether the voltage is DC or AC