10 #ifndef __ETHUPDATER_BOARDINFO_H__
11 #define __ETHUPDATER_BOARDINFO_H__
18 #include "EoUpdaterProtocol.h"
29 uint8_t boardinfo32[32];
39 ACE_UINT8 version_major,
40 ACE_UINT8 version_minor,
41 ACE_UINT8 protocol_version,
42 ACE_UINT32 protocol_capabilities)
50 mProtocolVersion = protocol_version;
51 mProtocolCapabilities = protocol_capabilities;
53 mVersionMajor=version_major;
54 mVersionMinor=version_minor;
56 mBoardType = string(
"N/A");
58 mRunningProcess = string(
"N/A");
60 mInfo32 = string(
"N/A");
62 mReleasedOn = string(
"N/A");
63 mBuiltOn = string(
"N/A");
77 mProtocolVersion =
info.protversion;
78 mProtocolCapabilities =
info.capabilities;
81 mMac =
info.macaddress;
83 eOuprot_process_t runningnow = eouprot_raw2process(
info.processes.runningnow);
84 mRunningProcess = from_process_to_string(runningnow);
85 mBoardType = from_boardtype_to_string(
info.boardtype);
86 mInfo32 = (0xff ==
info.boardinfo32[0]) ? (
string(
"N/A: PAGE32 IS UNFORMATTED")) : (
string((
const char*) &
info.boardinfo32[1]));
88 uint8_t index = eouprot_process2index(runningnow);
93 mReleasedOn = string(
"N/A");
94 mBuiltOn = string(
"N/A");
98 mVersionMajor =
info.processes.info[index].version.major;
99 mVersionMinor =
info.processes.info[index].version.minor;
100 mReleasedOn = from_date_to_string(
info.processes.info[index].date);
101 mBuiltOn = from_date_to_string(
info.processes.info[index].compilationdate);
133 string from_boardtype_to_string(uint8_t type)
136 string ret(eoboards_type2string2((eObrd_type_t)type, eobool_true));
140 string from_process_to_string(eOuprot_process_t type)
142 string ret(eouprot_process2string(type));
146 string from_date_to_string(eOdate_t date)
149 eo_common_date_to_string(date, strtmp,
sizeof(strtmp));
BoardInfo(ACE_UINT32 address, ACE_UINT32 mask, ACE_UINT64 mac, ACE_UINT8 version_major, ACE_UINT8 version_minor, ACE_UINT8 protocol_version, ACE_UINT32 protocol_capabilities)
ACE_UINT8 mProtocolVersion
BoardInfo(ACE_UINT32 address, boardInfo_t &info)
ACE_UINT32 mProtocolCapabilities
eOuprot_proctable_t processes