Package rst.devices.generic

This package collects device-independent data types.

It is only intended for data types which do not make sense outside the context of a specific device. Try to use generic data types instead, if possible.

Messages

digraph message_graph {
fontname="Arial";
fontsize=11;
stylesheet="../_static/corlab.css";
  node [fontsize=11]
  node [fontname="Arial"]
  edge [fontsize=11]
  edge [fontname="Arial"]
  "3" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.BatteryState" TITLE="Structure rst.devices.generic.BatteryState" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="RIGHT"><IMG SRC="../_static/message.svg" /></TD><TD ALIGN="LEFT">BatteryState</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.BatteryState.current" TITLE="Field rst.devices.generic.BatteryState.current" TARGET="_parent" PORT="current">current</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.BatteryState.charge_level" TITLE="Field rst.devices.generic.BatteryState.charge_level" TARGET="_parent" PORT="charge_level">charge_level</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.BatteryState.battery_temperature" TITLE="Field rst.devices.generic.BatteryState.battery_temperature" TARGET="_parent" PORT="battery_temperature">battery_temperature</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"];
  "1" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState" TITLE="Structure rst.devices.generic.CpuState" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="RIGHT"><IMG SRC="../_static/message.svg" /></TD><TD ALIGN="LEFT">CpuState</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT32.html#UINT32" TITLE="Fundamental UINT32" TARGET="_parent">UINT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.jiffy_length" TITLE="Field rst.devices.generic.CpuState.jiffy_length" TARGET="_parent" PORT="jiffy_length">jiffy_length</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu" TITLE="Structure rst.devices.generic.CpuState.Cpu" TARGET="_parent">Cpu</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.cpus" TITLE="Field rst.devices.generic.CpuState.cpus" TARGET="_parent" PORT="cpus">cpus</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.load_1" TITLE="Field rst.devices.generic.CpuState.load_1" TARGET="_parent" PORT="load_1">load_1</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.load_5" TITLE="Field rst.devices.generic.CpuState.load_5" TARGET="_parent" PORT="load_5">load_5</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.load_15" TITLE="Field rst.devices.generic.CpuState.load_15" TARGET="_parent" PORT="load_15">load_15</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"];
  "2" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu" TITLE="Structure rst.devices.generic.CpuState.Cpu" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="RIGHT"><IMG SRC="../_static/message.svg" /></TD><TD ALIGN="LEFT">Cpu</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-INT32.html#INT32" TITLE="Fundamental INT32" TARGET="_parent">INT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.index" TITLE="Field rst.devices.generic.CpuState.Cpu.index" TARGET="_parent" PORT="index">index</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.total" TITLE="Field rst.devices.generic.CpuState.Cpu.total" TARGET="_parent" PORT="total">total</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.idle" TITLE="Field rst.devices.generic.CpuState.Cpu.idle" TARGET="_parent" PORT="idle">idle</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.user" TITLE="Field rst.devices.generic.CpuState.Cpu.user" TARGET="_parent" PORT="user">user</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.user_low" TITLE="Field rst.devices.generic.CpuState.Cpu.user_low" TARGET="_parent" PORT="user_low">user_low</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.system" TITLE="Field rst.devices.generic.CpuState.Cpu.system" TARGET="_parent" PORT="system">system</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.iowait" TITLE="Field rst.devices.generic.CpuState.Cpu.iowait" TARGET="_parent" PORT="iowait">iowait</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.irq" TITLE="Field rst.devices.generic.CpuState.Cpu.irq" TARGET="_parent" PORT="irq">irq</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.softirq" TITLE="Field rst.devices.generic.CpuState.Cpu.softirq" TARGET="_parent" PORT="softirq">softirq</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.steal" TITLE="Field rst.devices.generic.CpuState.Cpu.steal" TARGET="_parent" PORT="steal">steal</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-devices-generic.html#rst.devices.generic.CpuState.Cpu.guest" TITLE="Field rst.devices.generic.CpuState.Cpu.guest" TARGET="_parent" PORT="guest">guest</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"];
  "1" -> "2" [dir=both,arrowtail=odiamond];
  "1":cpus -> "2" [];
}

clearer: should be made invisible via css

Message CpuState

class rst.devices.generic.CpuState

Low-level information of the CPU utilization for a single system with potentially multiple cores.

This message is currently designed closely along the information available in the Linux proc filesystem. So it is probably only directly useful for Linux systems.

Code author: Jens-Christian Seele <jseele@techfak.uni-bielefeld.de>

Code author: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>

jiffy_length
Type :UINT32

Unit: microsecond

The length of one measurement tick for the individual CPU counters.

cpus
Type :array of rst.devices.generic.CpuState.Cpu

An entry for each (virtualized) CPU or core of a multicore system.

load_1
Type :FLOAT32

Unit: number

Constraint: value>=0

Load average for one minute as defined by the linux kernel, e.g. in man proc: The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes

load_5
Type :FLOAT32

Unit: number

Constraint: value>=0

Load average for 5 minutes as defined by the linux kernel, e.g. in man proc: The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes

load_15
Type :FLOAT32

Unit: number

Constraint: value>=0

Load average for 15 minute as defined by the linux kernel, e.g. in man proc: The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes

Download this file

message CpuState {

    /**
     * The length of one measurement tick for the individual CPU counters.
     */
    // @unit(microsecond)
    optional uint32 jiffy_length = 10;

    /**
     * Measurements for a single CPU in the system.
     *
     * The supported detailed fields for each CPU vary with different Kernel
     * versions. In oder to calculate at least a valid load of the CPU,
     * minimally total and idle need to be given. Hence, they are required
     * fields. Ideally, @ref .idle + all other detail fields should sum up to
     * the total value.
     *
     * With each new measurement all counters must fulfill the condition
     * new value >= previous value. I.e. these are ever-increasing numbers and
     * differences need to be calculated to find out the current system
     * statistics.
     *
     * All values are measured in abstract ticks of a fixed length. This length
     * is specified @ref CpuState.jiffy_length.
     */
    message Cpu {

        /**
         * Identifier for the respective CPU or core in a multicore system.
         */
        // @unit(number)
        required int32 index = 1;

        /**
         * Total time spent by this CPU so far in any mode including idle.
         */
        // @unit(number)
        required uint64 total = 100;

        /**
         * Time spent idle.
         */
        // @unit(number)
        required uint64 idle = 5;

        /**
         * Time spent in user mode.
         */
        // @unit(number)
        optional uint64 user = 2;

        /**
         * Time spent in user mode with nice (low) priority.
         */
        // @unit(number)
        optional uint64 user_low = 3;

        /**
         * Time spent in system mode.
         */
        // @unit(number)
        optional uint64 system = 4;

        /**
         * Time spent waiting for IO to complete.
         */
        // @unit(number)
        optional uint64 iowait = 6;

        /**
         * Time spent servicing interrupts.
         */
        // @unit(number)
        optional uint64 irq = 7;

        /**
         * Time spent servicing softirqs.
         */
        // @unit(number)
        optional uint64 softirq = 8;

        /**
         * Time spent in another operating system in case of a virtualized system.
         */
        // @unit(number)
        optional uint64 steal = 9;

        /**
         * Time spent running a virtualized guest.
         */
        // @unit(number)
        optional uint64 guest = 10;

    }

    /**
     * An entry for each (virtualized) CPU or core of a multicore system.
     */
    repeated Cpu cpus = 20;

    /**
     * Load average for one minute as defined by the linux kernel, e.g. in
     * man proc:
     * The first three fields in this file are load average figures giving the
     * number of jobs in the run queue (state R) or waiting for disk I/O
     * (state D) averaged over 1, 5, and 15 minutes
     */
    // @unit(number)
    // @constraint(value>=0)
    optional float load_1 = 40;

    /**
     * Load average for 5 minutes as defined by the linux kernel, e.g. in
     * man proc:
     * The first three fields in this file are load average figures giving the
     * number of jobs in the run queue (state R) or waiting for disk I/O
     * (state D) averaged over 1, 5, and 15 minutes
     */
    // @unit(number)
    // @constraint(value>=0)
    optional float load_5 = 41;

    /**
     * Load average for 15 minute as defined by the linux kernel, e.g. in
     * man proc:
     * The first three fields in this file are load average figures giving the
     * number of jobs in the run queue (state R) or waiting for disk I/O
     * (state D) averaged over 1, 5, and 15 minutes
     */
    // @unit(number)
    // @constraint(value>=0)
    optional float load_15 = 42;

}

Message Cpu

class rst.devices.generic.CpuState.Cpu

Measurements for a single CPU in the system.

The supported detailed fields for each CPU vary with different Kernel versions. In oder to calculate at least a valid load of the CPU, minimally total and idle need to be given. Hence, they are required fields. Ideally, idle + all other detail fields should sum up to the total value.

With each new measurement all counters must fulfill the condition new value >= previous value. I.e. these are ever-increasing numbers and differences need to be calculated to find out the current system statistics.

All values are measured in abstract ticks of a fixed length. This length is specified <Could not resolve reference to CpuState.jiffy_length> .

index
Type :INT32

Unit: number

Identifier for the respective CPU or core in a multicore system.

total
Type :UINT64

Unit: number

Total time spent by this CPU so far in any mode including idle.

idle
Type :UINT64

Unit: number

Time spent idle.

user
Type :UINT64

Unit: number

Time spent in user mode.

user_low
Type :UINT64

Unit: number

Time spent in user mode with nice (low) priority.

system
Type :UINT64

Unit: number

Time spent in system mode.

iowait
Type :UINT64

Unit: number

Time spent waiting for IO to complete.

irq
Type :UINT64

Unit: number

Time spent servicing interrupts.

softirq
Type :UINT64

Unit: number

Time spent servicing softirqs.

steal
Type :UINT64

Unit: number

Time spent in another operating system in case of a virtualized system.

guest
Type :UINT64

Unit: number

Time spent running a virtualized guest.

Download this file

    message Cpu {

        /**
         * Identifier for the respective CPU or core in a multicore system.
         */
        // @unit(number)
        required int32 index = 1;

        /**
         * Total time spent by this CPU so far in any mode including idle.
         */
        // @unit(number)
        required uint64 total = 100;

        /**
         * Time spent idle.
         */
        // @unit(number)
        required uint64 idle = 5;

        /**
         * Time spent in user mode.
         */
        // @unit(number)
        optional uint64 user = 2;

        /**
         * Time spent in user mode with nice (low) priority.
         */
        // @unit(number)
        optional uint64 user_low = 3;

        /**
         * Time spent in system mode.
         */
        // @unit(number)
        optional uint64 system = 4;

        /**
         * Time spent waiting for IO to complete.
         */
        // @unit(number)
        optional uint64 iowait = 6;

        /**
         * Time spent servicing interrupts.
         */
        // @unit(number)
        optional uint64 irq = 7;

        /**
         * Time spent servicing softirqs.
         */
        // @unit(number)
        optional uint64 softirq = 8;

        /**
         * Time spent in another operating system in case of a virtualized system.
         */
        // @unit(number)
        optional uint64 steal = 9;

        /**
         * Time spent running a virtualized guest.
         */
        // @unit(number)
        optional uint64 guest = 10;

    }

Message BatteryState

class rst.devices.generic.BatteryState

Provides information about the state of a single battery.

Code author: Jens-Christian Seele <jseele@techfak.uni-bielefeld.de>

current
Type :FLOAT32

Unit: ampere

Indicates the electrical current draining or charging the battery at the moment.

Negative currents indicate discharging of the battery, positive ones indicate an attached charger.

charge_level
Type :FLOAT32

Unit: number

Constraint: 0<=value<=1

Indicates the current charging level of the battery, where 1 means full and 0 indicates completely empty.

battery_temperature
Type :FLOAT32

Unit: degree-celsius

The temperature of the battery.

Download this file

message BatteryState {

    /**
     * Indicates the electrical current draining or charging the battery at the
     * moment.
     *
     * Negative currents indicate discharging of the battery, positive ones
     * indicate an attached charger.
     */
    // @unit(ampere)
    optional float current = 1;

    /**
     * Indicates the current charging level of the battery, where 1 means full
     * and 0 indicates completely empty.
     */
    // @unit(number)
    // @constraint(0<=value<=1)
    required float charge_level = 2;

    /**
     * The temperature of the battery.
     */
    // @unit(degree-celsius)
    optional float battery_temperature = 3;

}

Table Of Contents

Related Documentation

This Page