1 /* ----------------------------------------------------------------------- * 2 * 3 * Copyright 2006 Erwan Velu - All Rights Reserved 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330, 8 * Boston MA 02111-1307, USA; either version 2 of the License, or 9 * (at your option) any later version; incorporated herein by reference. 10 * 11 * ----------------------------------------------------------------------- */ 12 13 #ifndef DMI_BASE_BOARD_H 14 #define DMI_BASE_BOARD_H 15 16 #include "stdbool.h" 17 #define BASE_BOARD_MANUFACTURER_SIZE 65 18 #define BASE_BOARD_PRODUCT_NAME_SIZE 65 19 #define BASE_BOARD_VERSION_SIZE 65 20 #define BASE_BOARD_SERIAL_SIZE 65 21 #define BASE_BOARD_ASSET_TAG_SIZE 65 22 #define BASE_BOARD_LOCATION_SIZE 65 23 #define BASE_BOARD_FEATURES_SIZE 32 24 #define BASE_BOARD_TYPE_SIZE 32 25 26 #define BASE_BOARD_NB_ELEMENTS 5 27 28 #define BASE_BOARD_DEVICE_DESCRIPTION 65 29 30 extern const char *base_board_features_strings[]; 31 32 /* this struct have BASE_BOARD_NB_ELEMENTS */ 33 /* each bool is associated to the relevant message above */ 34 typedef struct { 35 bool hosting; 36 bool board_needs_daughter; 37 bool removable; 38 bool replaceable; 39 bool hot_swappable; 40 } __attribute__ ((__packed__)) s_base_board_features; 41 42 typedef struct { 43 char manufacturer[BASE_BOARD_MANUFACTURER_SIZE]; 44 char product_name[BASE_BOARD_PRODUCT_NAME_SIZE]; 45 char version[BASE_BOARD_VERSION_SIZE]; 46 char serial[BASE_BOARD_SERIAL_SIZE]; 47 char asset_tag[BASE_BOARD_ASSET_TAG_SIZE]; 48 char location[BASE_BOARD_LOCATION_SIZE]; 49 char type[BASE_BOARD_TYPE_SIZE]; 50 s_base_board_features features; 51 /* The filled field have to be set to true when the dmitable implement that item */ 52 bool filled; 53 struct { 54 char type[16]; 55 uint8_t status; 56 char description[BASE_BOARD_DEVICE_DESCRIPTION]; 57 } devices_information[10]; 58 } s_base_board; 59 60 #endif 61