blob: 748a055d3d10185775c83b4d8a48e2350b7f1793 (
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
|
#include "XIpmiBaseboardVoltageRegulatorImp.h"
XIpmiBaseboardVoltageRegulatorImp::XIpmiBaseboardVoltageRegulatorImp(const XString& baseboardVoltageRegulatorIdentifier):
baseboardVoltageRegulatorIdentifier_(baseboardVoltageRegulatorIdentifier)
{
}
void XIpmiBaseboardVoltageRegulatorImp::setBaseboardVoltageRegulatorIdentifier(const XString& baseboardVoltageRegulatorIdentifier)
{
comVals_["baseboardVoltageRegulatorIdentifier"] = baseboardVoltageRegulatorIdentifier;
}
void XIpmiBaseboardVoltageRegulatorImp::setVoltageRegulatorTemperature(XNumber voltageRegulatorTemperature)
{
comVals_["voltageRegulatorTemperature"] = voltageRegulatorTemperature;
}
json XIpmiBaseboardVoltageRegulatorImp::toJson()
{
try
{
json field = {
{"baseboardVoltageRegulatorIdentifier", baseboardVoltageRegulatorIdentifier_}
};
//optional val
field = mergeCommonValues(field, comVals_);
return field;
}
catch (json::exception& e)
{
SPDLOG_ERROR("Fail to build XIpmiBaseboardVoltageRegulator to json object:{}.", e.what());
return json();
}
}
|