Trait ev3dev_lang_rust::Device [−][src]
pub trait Device {
fn get_attribute(&self, name: &str) -> Attribute;
fn get_address(&self) -> Ev3Result<String> { ... }
fn set_command(&self, command: &str) -> Ev3Result<()> { ... }
fn get_commands(&self) -> Ev3Result<Vec<String>> { ... }
fn get_driver_name(&self) -> Ev3Result<String> { ... }
}The ev3dev device base trait
Required methods
fn get_attribute(&self, name: &str) -> Attribute[src]
Returns the attribute wrapper for an attribute name.
Provided methods
fn get_address(&self) -> Ev3Result<String>[src]
Returns the name of the port that the motor is connected to.
fn set_command(&self, command: &str) -> Ev3Result<()>[src]
Sends a command to the device controller.
fn get_commands(&self) -> Ev3Result<Vec<String>>[src]
Returns a space separated list of commands that are supported by the device controller.
fn get_driver_name(&self) -> Ev3Result<String>[src]
Returns the name of the driver that provides this device.
Implementors
impl Device for LargeMotor[src]
impl Device for LargeMotor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for MediumMotor[src]
impl Device for MediumMotor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for ColorSensor[src]
impl Device for ColorSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for CompassSensor[src]
impl Device for CompassSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for GyroSensor[src]
impl Device for GyroSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for InfraredSensor[src]
impl Device for InfraredSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for IrSeekerSensor[src]
impl Device for IrSeekerSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for LightSensor[src]
impl Device for LightSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for TouchSensor[src]
impl Device for TouchSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for UltrasonicSensor[src]
impl Device for UltrasonicSensor[src]fn get_attribute(&self, name: &str) -> Attribute[src]
impl Device for PowerSupply[src]
impl Device for PowerSupply[src]