blob: e537dd07df5e1e7e210e8936f29df9cbceda3c26 (
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 "XIpmiBaseboardTemperatureImp.h"
XIpmiBaseboardTemperatureImp::XIpmiBaseboardTemperatureImp(const XString& baseboardTemperatureIdentifier):
baseboardTemperatureIdentifier_(baseboardTemperatureIdentifier)
{
}
void XIpmiBaseboardTemperatureImp::setBaseboardTemperature(XNumber baseboardTemperature)
{
comVals_["baseboardTemperature"] = baseboardTemperature;
}
void XIpmiBaseboardTemperatureImp::setBaseboardTemperatureIdentifier(const XString& baseboardTemperatureIdentifier)
{
comVals_["baseboardTemperatureIdentifier"] = baseboardTemperatureIdentifier;
}
json XIpmiBaseboardTemperatureImp::toJson()
{
try
{
json field = {
{"baseboardTemperatureIdentifier", baseboardTemperatureIdentifier_}
};
//optional val
field = mergeCommonValues(field, comVals_);
return field;
}
catch (json::exception& e)
{
SPDLOG_ERROR("Fail to build XIpmiBaseboardTemperature to json object:{}.", e.what());
return json();
}
}
|