lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
type39.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: LGPL-2.1-or-later
3 *
4 * This file is part of lazybios.
5 *
6 * lazybios is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * lazybios is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with lazybios. If not, see <https://www.gnu.org/licenses/>.
18 */
19/**
20 * @file type39.h
21 * @brief Public API for SMBIOS Type 39 System Power Supply.
22 * @author LazySeldi
23 */
24
25#ifndef LAZYBIOS_TYPE39_H
26#define LAZYBIOS_TYPE39_H
27
28#ifndef LAZYBIOS_SHARED_API_H
29#define LAZYBIOS_TYPE_HEADER_ONLY
30#include "lazybios/lazybios.h"
31#undef LAZYBIOS_TYPE_HEADER_ONLY
32#endif
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/** @brief Availability metadata for SMBIOS Type 39 fields. */
54
55/**
56 * @brief Decoded forms of the Type 39 encoded fields.
57 *
58 * Each member holds the decoded form of the raw field it is named for.
59 * Consult the matching `field_status` member before using one.
60 */
67
68/**
69 * @brief Parsed SMBIOS Type 39 System Power Supply information.
70 * @ingroup api_type39
71 */
91
92/**
93 * @brief A parsed set of SMBIOS Type 39 structures.
94 * @ingroup api_type39
95 */
100
101/** @addtogroup api_type39
102 * @{
103 */
104
105/**
106 * @brief Parses all SMBIOS Type 39 structures.
107 * @param DMIData Raw DMI table container to parse.
108 * @return Newly allocated set, empty when the table holds no Type 39 structure,
109 * or NULL when the arguments are unusable or an allocation fails.
110 */
112
113/**
114 * @brief Releases a parsed set of SMBIOS Type 39 structures.
115 * @param Type39 Set to release; may be NULL.
116 */
118
119/** @} */
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif
LAZYBIOS_WARN_UNUSED lazybiosType39Array_t * lazybiosGetType39(const lazybiosDMI_t *DMIData)
Parses all SMBIOS Type 39 structures.
void lazybiosFreeType39(lazybiosType39Array_t *Type39)
Releases a parsed set of SMBIOS Type 39 structures.
Public API for lazybios. Include this and nothing else.
uint8_t lazybiosFieldStatus_t
Storage for one field's availability.
Definition lazybios.h:115
#define LAZYBIOS_WARN_UNUSED
Expands to nothing on compilers without a return-value check.
Definition lazybios.h:150
Owns raw DMI table data and its parsed SMBIOS entry point.
Definition lazybios.h:218
A parsed set of SMBIOS Type 39 structures.
Definition type39.h:96
lazybiosType39_t * entries
Definition type39.h:97
Decoded forms of the Type 39 encoded fields.
Definition type39.h:61
char * power_supply_characteristics
Definition type39.h:65
const char * power_supply_type
Definition type39.h:63
const char * status
Definition type39.h:64
const char * input_voltage_range_switching
Definition type39.h:62
Availability metadata for SMBIOS Type 39 fields.
Definition type39.h:39
lazybiosFieldStatus_t device_name
Definition type39.h:42
lazybiosFieldStatus_t manufacturer
Definition type39.h:43
lazybiosFieldStatus_t model_part_number
Definition type39.h:46
lazybiosFieldStatus_t power_supply_characteristics
Definition type39.h:49
lazybiosFieldStatus_t input_voltage_probe_handle
Definition type39.h:50
lazybiosFieldStatus_t cooling_device_handle
Definition type39.h:51
lazybiosFieldStatus_t input_current_probe_handle
Definition type39.h:52
lazybiosFieldStatus_t power_unit_group
Definition type39.h:40
lazybiosFieldStatus_t max_power_capacity
Definition type39.h:48
lazybiosFieldStatus_t asset_tag_number
Definition type39.h:45
lazybiosFieldStatus_t location
Definition type39.h:41
lazybiosFieldStatus_t revision_level
Definition type39.h:47
lazybiosFieldStatus_t serial_number
Definition type39.h:44
Parsed SMBIOS Type 39 System Power Supply information.
Definition type39.h:72
const char * model_part_number
Definition type39.h:81
uint8_t power_unit_group
Definition type39.h:75
const char * asset_tag_number
Definition type39.h:80
uint16_t power_supply_characteristics
Definition type39.h:84
uint16_t input_voltage_probe_handle
Definition type39.h:85
lazybiosType39FieldStatus_t field_status
Definition type39.h:89
uint16_t handle
Definition type39.h:73
uint16_t input_current_probe_handle
Definition type39.h:87
uint8_t length
Definition type39.h:74
const char * device_name
Definition type39.h:77
uint16_t cooling_device_handle
Definition type39.h:86
const char * revision_level
Definition type39.h:82
const char * manufacturer
Definition type39.h:78
const char * location
Definition type39.h:76
lazybiosType39Decoded_t decoded
Definition type39.h:88
uint16_t max_power_capacity
Definition type39.h:83
const char * serial_number
Definition type39.h:79