<?xml version="1.0" encoding="UTF-8"?>
<keywordspec name="grpc_robot.DmiTools" type="LIBRARY" format="ROBOT" scope="TEST" namedargs="true" generated="2021-07-14T07:45:59Z" specversion="2" source="../grpc_robot/tools/dmi_tools.py" lineno="19">
<version>2.9.1</version>
<scope>test case</scope>
<namedargs>yes</namedargs>
<doc>Tools for the device-management-interface, e.g decoding / conversions.</doc>
<kw name="Hw Events Mgmt Decode Event" lineno="58">
<arguments>
<arg>bytestring</arg>
<arg>return_enum_integer=false</arg>
<arg>return_defaults=false</arg>
<arg>human_readable_timestamps=true</arg>
</arguments>
<doc>Converts bytes to a Event as defined in _message Event_ from hw_events_mgmt_service.proto

*Parameters*:
- bytestring: &lt;bytes&gt;; Byte string, e.g. as it comes from Kafka messages.
- return_enum_integer: &lt;string&gt; or &lt;bool&gt;; Whether or not to return the enum values as integer values rather than their labels. Default: _false_.
- return_defaults: &lt;string&gt; or &lt;bool&gt;; Whether or not to return the default values. Default: _false_.
- human_readable_timestamps: &lt;string&gt; or &lt;bool&gt;; Whether or not to convert the timestamps to human-readable format. Default: _true_.

*Return*: A dictionary with same structure as the _event_ key from the return dictionary of keyword _Hw Event Mgmt Service List Events_.

*Example*:
| Import Library | grpc_robot.DmiTools | WITH NAME | dmi_tools |
| ${kafka_records} | kafka.Records Get |
| FOR | ${kafka_record} | IN | @{kafka_records} |
|  | ${event} | dmi_tools.Hw Events Mgmt Decode Event | ${kafka_record}[message] |
|  | Log | ${event} |
| END |</doc>
</kw>
<kw name="Hw Metrics Mgmt Decode Metric" lineno="30">
<arguments>
<arg>bytestring</arg>
<arg>return_enum_integer=false</arg>
<arg>return_defaults=false</arg>
<arg>human_readable_timestamps=true</arg>
</arguments>
<doc>Converts bytes to a Metric as defined in _message Metric_ from hw_metrics_mgmt_service.proto

*Parameters*:
- bytestring: &lt;bytes&gt;; Byte string, e.g. as it comes from Kafka messages.
- return_enum_integer: &lt;string&gt; or &lt;bool&gt;; Whether or not to return the enum values as integer values rather than their labels. Default: _false_.
- return_defaults: &lt;string&gt; or &lt;bool&gt;; Whether or not to return the default values. Default: _false_.
- human_readable_timestamps: &lt;string&gt; or &lt;bool&gt;; Whether or not to convert the timestamps to human-readable format. Default: _true_.

*Return*: A dictionary with same structure as the _metric_ key from the return dictionary of keyword _Hw Metrics Mgmt Service Get Metric_.

*Example*:
| Import Library | grpc_robot.DmiTools | WITH NAME | dmi_tools |
| ${kafka_records} | kafka.Records Get |
| FOR | ${kafka_record} | IN | @{kafka_records} |
|  | ${metric} | dmi_tools.Hw Metrics Mgmt Decode Metric | ${kafka_record}[message] |
|  | Log | ${metric} |
| END |</doc>
</kw>
</keywordspec>
