package qmp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type enabled = {
  1. enabled : bool;
    (*

    feature is present and turned on

    *)
  2. present : bool;
    (*

    feature is present (but may not be turned on)

    *)
}
type result =
  1. | Name_list of string list
  2. | Enabled of enabled
  3. | Status of string
  4. | Unit
    (*

    A successful RPC result

    *)
type greeting = {
  1. major : int;
    (*

    qemu major version

    *)
  2. minor : int;
    (*

    qemu minor version

    *)
  3. micro : int;
    (*

    qemu micro version

    *)
  4. package : string;
    (*

    some information about the (binary?) package

    *)
}
type event = {
  1. secs : int;
    (*

    time the event occurred in secs ...

    *)
  2. usecs : int;
    (*

    ... and usecs

    *)
  3. event : string;
    (*

    type of event

    *)
}
type error = {
  1. cls : string;
  2. descr : string;
}
type id = string

identifier used to match responses with original requests

type command =
  1. | Qmp_capabilities
  2. | Query_commands
  3. | Query_kvm
  4. | Query_status
  5. | Stop
  6. | Cont
  7. | Eject of string
  8. | System_powerdown
    (*

    commands that may be sent to qemu

    *)
type message =
  1. | Greeting of greeting
  2. | Command of id option * command
  3. | Error of id option * error
  4. | Success of id option * result
  5. | Event of event
    (*

    an individual message sent or received to or from qemu

    *)
val message_of_string : string -> message
val string_of_message : message -> string
val json_of_message : message -> Yojson.Safe.json
OCaml

Innovation. Community. Security.