Sensor
Object Hierarchy:
Description:
[ CCode ( type_id = "cd_sensor_get_type ()" ) ]
public class Sensor : Object
Content:
Properties:
- public string connected { get; }
The if the object path has been connected as is valid for use.
- public string embedded { get; }
If the sensor has a native driver.
- public string id { get; }
The object ID of the remote object
- public string kind { get; }
The sensor kind.
- public string locked { get; }
If the sensor is locked.
- public string mode { get; }
The sensor mode.
- public string model { get; }
The sensor model.
- public string native { get; }
If the sensor has a native driver.
- public string object_path { get; set construct; }
The object path of the remote object
- public string serial { get; }
The sensor ID.
- public string state { get; }
The sensor state.
- public string vendor { get; }
The sensor vendor.
Static methods:
Creation methods:
Methods:
- public async bool @lock (Cancellable? cancellable) throws Error
Locks the device so we can use it.
- public async bool @unlock (Cancellable? cancellable) throws Error
Unlocks the sensor for use by other programs.
- public async bool connect (Cancellable? cancellable) throws Error
Connects to the sensor.
- public bool connect_sync (Cancellable? cancellable = null) throws Error
Connects to the object and fills up initial properties.
- public bool equal (Sensor sensor2)
Tests two sensors for equality.
- public uint64 get_caps ()
Returns the sensor metadata.
- public bool get_connected ()
Gets if the sensor has been connected.
- public bool get_embedded ()
Returns if the sensor is embedded into the computer.
- public unowned string get_id ()
Gets the object ID for the sensor.
- public SensorKind get_kind ()
Gets the sensor kind.
- public bool get_locked ()
Returns if the sensor is locked.
- public HashTable<unowned string,unowned string> get_metadata ()
Returns the sensor metadata.
- public unowned string get_metadata_item (string key)
Returns the sensor metadata for a specific key.
- public SensorCap get_mode ()
Gets the sensor operating mode.
- public unowned string get_model ()
Gets the sensor model.
- public bool get_native ()
Returns if the sensor has a native driver.
- public unowned string get_object_path ()
Gets the object path for the sensor.
- public unowned string get_option (string key)
Gets a specific sensor option.
- public HashTable<unowned string,unowned Variant> get_options ()
Gets any sensor options.
- public async ColorXYZ get_sample (SensorCap cap, Cancellable? cancellable) throws Error
Gets a color sample from a sensor
- public ColorXYZ get_sample_sync (SensorCap cap, Cancellable? cancellable = null) throws Error
Gets a sample from the sensor.
- public unowned string get_serial ()
Gets the sensor serial number.
- public async Spectrum get_spectrum (SensorCap cap, Cancellable? cancellable) throws Error
Gets a color spectrum from a sensor
- public Spectrum get_spectrum_sync (SensorCap cap, Cancellable? cancellable = null) throws Error
Gets a spectrum from the sensor.
- public SensorState get_state ()
Gets the sensor state.
- public unowned string get_vendor ()
Gets the sensor vendor.
- public bool has_cap (SensorCap cap)
Returns the sensor metadata for a specific key.
- public bool lock_sync (Cancellable? cancellable = null) throws Error
Locks the device so we can use it.
- public void set_object_path (string object_path)
Sets the object path of the sensor.
- public async bool set_options (HashTable<string,Variant> values, Cancellable? cancellable) throws Error
Sets options on the sensor device.
- public bool set_options_sync (HashTable<string,Variant> values, Cancellable? cancellable = null) throws Error
Sets options on the sensor device.
- public string to_string ()
- public bool unlock_sync (Cancellable? cancellable = null) throws Error
Unlocks the device for use by other programs.
Signals:
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref