.. _package-rst-devices-generic: ============================= 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 ======== .. container:: mess4ge-multi .. container:: mess4ge-graph .. 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=<
BatteryState
FLOAT32current
FLOAT32charge_level
FLOAT32battery_temperature
>,shape=box,style=filled,fillcolor="white"]; "1" [label=<
CpuState
UINT32jiffy_length
Cpucpus
FLOAT32load_1
FLOAT32load_5
FLOAT32load_15
>,shape=box,style=filled,fillcolor="white"]; "2" [label=<
Cpu
INT32index
UINT64total
UINT64idle
UINT64user
UINT64user_low
UINT64system
UINT64iowait
UINT64irq
UINT64softirq
UINT64steal
UINT64guest
>,shape=box,style=filled,fillcolor="white"]; "1" -> "2" [dir=both,arrowtail=odiamond]; "1":cpus -> "2" []; .. container:: mess4ge-list .. container:: messages * :ref:`CpuState ` * :ref:`BatteryState ` .. container:: clearer clearer: should be made invisible via css .. _message-rst-devices-generic-cpustate: Message CpuState ---------------- .. container:: message-rst-devices-generic-cpustate-multi .. container:: message-rst-devices-generic-cpustate-documentation .. py: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. .. codeauthor:: Jens-Christian Seele .. codeauthor:: Johannes Wienke .. py:attribute:: jiffy_length :type: :py:class:`UINT32` **Unit**: microsecond The length of one measurement tick for the individual CPU counters. .. py:attribute:: cpus :type: array of :py:class:`rst.devices.generic.CpuState.Cpu` An entry for each (virtualized) CPU or core of a multicore system. .. py:attribute:: load_1 :type: :py:class:`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 .. py:attribute:: load_5 :type: :py:class:`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 .. py:attribute:: load_15 :type: :py:class:`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 .. container:: message-rst-devices-generic-cpustate-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.10-merge-simulator/rst-manual/../rst-proto/proto/stable/rst/devices/generic/CpuState.proto :lines: 16-149 :language: protobuf :emphasize-lines: 7-7,99-99,110-110,121-121,132-132 .. _message-rst-devices-generic-cpustate-cpu: Message Cpu ----------- .. container:: message-rst-devices-generic-cpustate-cpu-multi .. container:: message-rst-devices-generic-cpustate-cpu-documentation .. py: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, :py:attr:`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 . .. py:attribute:: index :type: :py:class:`INT32` **Unit**: number Identifier for the respective CPU or core in a multicore system. .. py:attribute:: total :type: :py:class:`UINT64` **Unit**: number Total time spent by this CPU so far in any mode including idle. .. py:attribute:: idle :type: :py:class:`UINT64` **Unit**: number Time spent idle. .. py:attribute:: user :type: :py:class:`UINT64` **Unit**: number Time spent in user mode. .. py:attribute:: user_low :type: :py:class:`UINT64` **Unit**: number Time spent in user mode with nice (low) priority. .. py:attribute:: system :type: :py:class:`UINT64` **Unit**: number Time spent in system mode. .. py:attribute:: iowait :type: :py:class:`UINT64` **Unit**: number Time spent waiting for IO to complete. .. py:attribute:: irq :type: :py:class:`UINT64` **Unit**: number Time spent servicing interrupts. .. py:attribute:: softirq :type: :py:class:`UINT64` **Unit**: number Time spent servicing softirqs. .. py:attribute:: steal :type: :py:class:`UINT64` **Unit**: number Time spent in another operating system in case of a virtualized system. .. py:attribute:: guest :type: :py:class:`UINT64` **Unit**: number Time spent running a virtualized guest. .. container:: message-rst-devices-generic-cpustate-cpu-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.10-merge-simulator/rst-manual/../rst-proto/proto/stable/rst/devices/generic/CpuState.proto :lines: 41-109 :language: protobuf :emphasize-lines: 7-7,13-13,19-19,25-25,31-31,37-37,43-43,49-49,55-55,61-61,67-67 .. _message-rst-devices-generic-batterystate: Message BatteryState -------------------- .. container:: message-rst-devices-generic-batterystate-multi .. container:: message-rst-devices-generic-batterystate-documentation .. py:class:: rst.devices.generic.BatteryState Provides information about the state of a single battery. .. codeauthor:: Jens-Christian Seele .. py:attribute:: current :type: :py:class:`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. .. py:attribute:: charge_level :type: :py:class:`FLOAT32` **Unit**: number **Constraint**: ``0<=value<=1`` Indicates the current charging level of the battery, where 1 means full and 0 indicates completely empty. .. py:attribute:: battery_temperature :type: :py:class:`FLOAT32` **Unit**: degree-celsius The temperature of the battery. .. container:: message-rst-devices-generic-batterystate-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.10-merge-simulator/rst-manual/../rst-proto/proto/stable/rst/devices/generic/BatteryState.proto :lines: 10-36 :language: protobuf :emphasize-lines: 11-11,19-19,25-25