aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude/dmi/dmi_base_board.h
blob: 3d5fb557364d01dea835f5559be358061847da9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* ----------------------------------------------------------------------- *
 *
 *   Copyright 2006 Erwan Velu - All Rights Reserved
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
 *   Boston MA 02111-1307, USA; either version 2 of the License, or
 *   (at your option) any later version; incorporated herein by reference.
 *
 * ----------------------------------------------------------------------- */

#ifndef DMI_BASE_BOARD_H
#define DMI_BASE_BOARD_H

#include "stdbool.h"
#define BASE_BOARD_MANUFACTURER_SIZE		32
#define BASE_BOARD_PRODUCT_NAME_SIZE		32
#define BASE_BOARD_VERSION_SIZE			16
#define BASE_BOARD_SERIAL_SIZE			32
#define BASE_BOARD_ASSET_TAG_SIZE		32
#define BASE_BOARD_LOCATION_SIZE		32
#define BASE_BOARD_FEATURES_SIZE		32
#define BASE_BOARD_TYPE_SIZE			32

#define BASE_BOARD_NB_ELEMENTS			5

extern const char *base_board_features_strings[];

/* this struct have BASE_BOARD_NB_ELEMENTS */
/* each bool is associated to the relevant message above */
typedef struct {
    bool hosting;
    bool board_needs_daughter;
    bool removable;
    bool replaceable;
    bool hot_swappable;
} __attribute__ ((__packed__)) s_base_board_features;

typedef struct {
    char manufacturer[BASE_BOARD_MANUFACTURER_SIZE];
    char product_name[BASE_BOARD_PRODUCT_NAME_SIZE];
    char version[BASE_BOARD_VERSION_SIZE];
    char serial[BASE_BOARD_SERIAL_SIZE];
    char asset_tag[BASE_BOARD_ASSET_TAG_SIZE];
    char location[BASE_BOARD_LOCATION_SIZE];
    char type[BASE_BOARD_TYPE_SIZE];
    s_base_board_features features;
/* The filled field have to be set to true when the dmitable implement that item */
    bool filled;
    struct {
	char type[16];
	uint8_t status;
	char description[10];
    } devices_information[10];
} s_base_board;

#endif