package obus

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

UPower device interface

include OBus_proxy.Private
type t = private OBus_proxy.proxy
val of_proxy : OBus_proxy.proxy -> t
val to_proxy : t -> OBus_proxy.proxy
Types
type typ = [
  1. | `Unknown
  2. | `Line_power
  3. | `Battery
  4. | `Ups
  5. | `Monitor
  6. | `Mouse
  7. | `Keyboard
  8. | `Pda
  9. | `Phone
]

Type of power source

type state = [
  1. | `Unknown
  2. | `Charging
  3. | `Discharging
  4. | `Empty
  5. | `Fully_charged
  6. | `Pending_charge
  7. | `Pending_discharge
]

The battery power state

type technology = [
  1. | `Unknown
  2. | `Lithium_ion
  3. | `Lithium_polymer
  4. | `Lithium_iron_phosphate
  5. | `Lead_acid
  6. | `Nickel_cadmium
  7. | `Nickel_metal_hydride
]

Technology used in the battery

val general_error : OBus_error.name
Methods
val get_statistics : t -> typ:string -> (float * float) list Lwt.t
val get_history : t -> typ:string -> timespan:int -> resolution:int -> (int * float * int) list Lwt.t
val refresh : t -> unit Lwt.t
Signals
val changed : t -> unit OBus_signal.t
Properties
val recall_url : t -> string OBus_property.r
val recall_vendor : t -> string OBus_property.r
val recall_notice : t -> bool OBus_property.r
val technology : t -> technology OBus_property.r
val capacity : t -> float OBus_property.r
val is_rechargeable : t -> bool OBus_property.r
val state : t -> state OBus_property.r
val is_present : t -> bool OBus_property.r
val percentage : t -> float OBus_property.r
val time_to_full : t -> int64 OBus_property.r
val time_to_empty : t -> int64 OBus_property.r
val voltage : t -> float OBus_property.r
val energy_rate : t -> float OBus_property.r
val energy_full_design : t -> float OBus_property.r
val energy_full : t -> float OBus_property.r
val energy_empty : t -> float OBus_property.r
val energy : t -> float OBus_property.r
val online : t -> bool OBus_property.r
val has_statistics : t -> bool OBus_property.r
val has_history : t -> bool OBus_property.r
val power_supply : t -> bool OBus_property.r
val typ : t -> typ OBus_property.r
val update_time : t -> int64 OBus_property.r
val serial : t -> string OBus_property.r
val model : t -> string OBus_property.r
val vendor : t -> string OBus_property.r
val native_path : t -> string OBus_property.r
val properties : t -> OBus_property.group