Trait ev3dev_lang_rust::core::Device [−][src]
pub trait Device {
fn get_attribute(&mut self, name: &str) -> &Attribute;
fn get_address(&mut self) -> AttributeResult<String> { ... }
fn set_command(&mut self, command: String) -> AttributeResult<()> { ... }
fn get_commands(&mut self) -> AttributeResult<Vec<String>> { ... }
fn get_driver_name(&mut self) -> AttributeResult<String> { ... }
}Required Methods
fn get_attribute(&mut self, name: &str) -> &Attribute
Provided Methods
fn get_address(&mut self) -> AttributeResult<String>
Returns the name of the port that the motor is connected to.
fn set_command(&mut self, command: String) -> AttributeResult<()>
Sends a command to the device controller.
fn get_commands(&mut self) -> AttributeResult<Vec<String>>
Returns a space separated list of commands that are supported by the device controller.
fn get_driver_name(&mut self) -> AttributeResult<String>
Returns the name of the driver that provides this device.
Implementors
impl Device for LargeMotorimpl Device for MediumMotorimpl Device for ColorSensorimpl Device for GyroSensorimpl Device for TouchSensorimpl Device for InfraredSensorimpl Device for UltrasonicSensor