package obus

  1. Overview
  2. Docs
Pure Ocaml implementation of the D-Bus protocol

Install

Dune Dependency

Authors

Maintainers

Sources

obus-1.2.5.tar.gz
md5=81eb1034c6ef4421a2368a9b352199de
sha512=4b540497188a7d78f4f14f94c6b7fdff47dd06436a34e650ff378dd77bb3e2acb7afd45cd72daf4ddba06e732e9944d560c2882dc37862f1b1f1bb6df37e6205

doc/obus.upower/UPower_device/index.html

Module UPower_deviceSource

UPower device interface

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

Type of power source

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

The battery power state

Sourcetype 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

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

Innovation. Community. Security.