Sensor
Object Hierarchy:
Description:
public class Sensor :
Device
Represents a LEGO MINDSTORMS or LEGO WeDo sensor
Content:
Properties:
- public string? fw_version { get; }
Gets the firmware version.
- public int poll_ms { get; }
Gets the polling period in milliseconds.
- public int decimals { get; }
Gets the number of decimal places for the value* attributes.
- public string[]? modes { owned get; }
Gets the list of available modes.
- public string mode { owned get; }
Gets the current mode.
- public string[]? commands { owned get; }
Gets the list of available commands.
- public int num_values { get; }
Gets the number of valid value attributes.
- public string port_name { owned get; }
Gets the name of the port that the sensor is attached to.
- public string? units { owned get; }
Gets the units of the value attributes.
- public string driver_name { owned get; }
Gets the name of the driver that loaded this Sensor.
Methods:
- public int get_value (int index) throws Error
Gets the value of a value attribute.
- public double get_float_value (int index) throws Error
Gets the value of a value attribute as a floating point number.
- public void set_mode (string mode) throws Error
Sets the mode.
- public void send_command (string command) throws Error
Sends a command to the sensor.
- public void set_poll_ms (int poll_ms) throws Error
Sets the polling period.
Inherited Members:
All known members inherited from class EV3devKit.Devices.Device
All known members inherited from class GLib.Object
- @new
- newv
- new_valist
- get_type
- get_class
- @ref
- unref
- ref_sink
- weak_ref
- weak_unref
- add_weak_pointer
- remove_weak_pointer
- @get
- @set
- get_property
- set_property
- get_data
- set_data
- set_data_full
- steal_data
- get_qdata
- set_qdata
- set_qdata_full
- steal_qdata
- freeze_notify
- thaw_notify
- dispose
- constructed
- notify_property
- connect
- disconnect
- add_toggle_ref
- remove_toggle_ref
- bind_property
- notify
- ref_count