blob: 48d8062e6fa5f2d738f06d34674d6793b7b8c8b2 (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
#ifndef fapiStructs_h
#define fapiStructs_h
// Copyright **********************************************************
//
// File fapiStructs.H
//
// IBM Confidential
// OCO Source Materials
// 9400 Licensed Internal Code
// (C) COPYRIGHT IBM CORP. 1996
//
// The source code for this program is not published or otherwise
// divested of its trade secrets, irrespective of what has been
// deposited with the U.S. Copyright Office.
//
// End Copyright ******************************************************
/**
* @file fapiStructs.H
* @brief fapi eCMD Extension Structures
* Extension Owner : John Farrugia
*/
//--------------------------------------------------------------------
// Includes
//--------------------------------------------------------------------
#include <string>
//--------------------------------------------------------------------
// Forward References
//--------------------------------------------------------------------
#define ECMD_FAPI_CAPI_VERSION "1.0" ///< eCMD FAPI Extension version
#ifndef ECMD_PERLAPI
namespace fapi
{
/**
* @brief Enumeration of fapi file types
*/
typedef enum {
FAPI_FILE_UNKNOWN, ///< Default for not initialized
FAPI_FILE_HWP
} FileType_t;
enum AttributeSource
{
FAPI_ATTRIBUTE_SOURCE_UNKNOWN = 0x00000000,
FAPI_ATTRIBUTE_SOURCE_PLAT = 0x00000001,
FAPI_ATTRIBUTE_SOURCE_HWP = 0x00000002,
};
#define FAPI_ATTRIBUTE_TYPE_STRING 0x80000000
#define FAPI_ATTRIBUTE_TYPE_UINT8 0x40000000
#define FAPI_ATTRIBUTE_TYPE_UINT32 0x20000000
#define FAPI_ATTRIBUTE_TYPE_UINT64 0x10000000
#define FAPI_ATTRIBUTE_TYPE_UINT8ARY 0x04000000
#define FAPI_ATTRIBUTE_TYPE_UINT32ARY 0x02000000
#define FAPI_ATTRIBUTE_TYPE_UINT64ARY 0x01000000
#define FAPI_ATTRIBUTE_MODE_CONST 0x80000000
/**
@brief Used by the get/set configuration functions to return the data
*/
template<typename T>
class Attribute
{
public:
// Constructor
Attribute();
// Destructor
~Attribute();
//
/// @brief Assignment Operator.
/// @param[in] i_right Reference to Value to assign from.
/// @return Reference to 'this' Target
///
Attribute<T>& operator=(const T& i_right)
{
this->value = i_right->value;
}
private:
T value;
};
inline AttributeData::AttributeData() {}
inline AttributeData::~AttributeData() {}
} //namespace
#endif // #ifndef ECMD_PERLAPI
#endif
|