package obus

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

Quality of service policy

Types

Type of request identifiers

type latency = [
  1. | `Cpu_dma
  2. | `Network
]

Type of latency request

type latency_request = {
  1. lr_uid : int;
    (*

    The user ID that issued the request.

    *)
  2. lr_pid : int;
    (*

    The process ID of the application.

    *)
  3. lr_exec : string;
    (*

    The executable that issued the request.

    *)
  4. lr_timespec : int64;
    (*

    The number of seconds since the epoch.

    *)
  5. lr_persistent : bool;
    (*

    If the request is persistent and outlives the connection lifetime.

    *)
  6. lr_typ : latency;
    (*

    The type of the request.

    *)
  7. lr_reserved : string;
  8. lr_value : int;
    (*

    The value, in microseconds or kilobits per second.

    *)
}
Methods
val get_latency_requests : UPower.t -> latency_request list Lwt.t
val get_latency : UPower.t -> latency:latency -> int Lwt.t
val request_latency : UPower.t -> latency:latency -> value:int -> persistent:bool -> cookie Lwt.t
val cancel_request : UPower.t -> latency:latency -> cookie:cookie -> unit Lwt.t
val set_minimum_latency : UPower.t -> latency:latency -> value:int -> unit Lwt.t
Signals
val requests_changed : UPower.t -> unit OBus_signal.t
val latency_changed : UPower.t -> (latency * int) OBus_signal.t
OCaml

Innovation. Community. Security.