PowerSensor class abstract Components

PowerSensor reports information about voltage, current, and power.

For more information, see Power Sensor component.

Inheritance
Implementers

Constructors

PowerSensor()

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

current({Map<String, dynamic>? extra}) Future<Current>
Get the current in amperes, and whether the current is AC (true) or DC (false).
doCommand(Map<String, dynamic> command) Future<Map<String, dynamic>>
Send/Receive arbitrary commands to the Resource
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
power({Map<String, dynamic>? extra}) Future<double>
Get the power (watts)
readings({Map<String, dynamic>? extra}) Future<Map<String, dynamic>>
Get the measurements or readings from this PowerSensor. If a sensor is not configured correctly or fails to read a piece of data, it will not appear in the readings dictionary.
toString() String
A string representation of this object.
inherited
voltage({Map<String, dynamic>? extra}) Future<Voltage>
Get the voltage in volts, and whether the power is AC (true) or DC (false).

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromRobot(RobotClient robot, String name) PowerSensor
Get the PowerSensor named name from the provided robot.
getResourceName(String name) ResourceName
Get the ResourceName for this PowerSensor with the given name.

Constants

subtype → const Subtype