Home
last modified time | relevance | path

Searched hist:"1 ea78801ce35583c988a45555160adcdac280a83" (Results 1 – 3 of 3) sorted by relevance

/openbmc/phosphor-logging/test/openpower-pels/
H A Drepository_test.cppdiff 1ea78801ce35583c988a45555160adcdac280a83 Fri Nov 01 13:04:59 CDT 2019 Matt Spinler <spinler@us.ibm.com> PEL: Run a user defined function on every PEL

Add a for_each() function to the PEL repository that takes a user
defined function that will be run on every PEL, unless that function
says to stop early.

The user defined function is a std::function<bool>(const PEL&);

For example, to save up to 100 IDs in the repo into a vector:
std::vector<uint32_t> ids;
ForEachFunc f = [&ids](const PEL& pel) {
ids.push_back(pel.id());
return ids.size() == 100 ? true : false;
};

repo.for_each(f);

This will be used to find which PELs still need to be sent up to the
host after a reboot, among other things.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic60525a8ab3dd593ba37e43a6cb0b3db8dda7cee
/openbmc/phosphor-logging/extensions/openpower-pels/
H A Drepository.hppdiff 1ea78801ce35583c988a45555160adcdac280a83 Fri Nov 01 13:04:59 CDT 2019 Matt Spinler <spinler@us.ibm.com> PEL: Run a user defined function on every PEL

Add a for_each() function to the PEL repository that takes a user
defined function that will be run on every PEL, unless that function
says to stop early.

The user defined function is a std::function<bool>(const PEL&);

For example, to save up to 100 IDs in the repo into a vector:
std::vector<uint32_t> ids;
ForEachFunc f = [&ids](const PEL& pel) {
ids.push_back(pel.id());
return ids.size() == 100 ? true : false;
};

repo.for_each(f);

This will be used to find which PELs still need to be sent up to the
host after a reboot, among other things.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic60525a8ab3dd593ba37e43a6cb0b3db8dda7cee
H A Drepository.cppdiff 1ea78801ce35583c988a45555160adcdac280a83 Fri Nov 01 13:04:59 CDT 2019 Matt Spinler <spinler@us.ibm.com> PEL: Run a user defined function on every PEL

Add a for_each() function to the PEL repository that takes a user
defined function that will be run on every PEL, unless that function
says to stop early.

The user defined function is a std::function<bool>(const PEL&);

For example, to save up to 100 IDs in the repo into a vector:
std::vector<uint32_t> ids;
ForEachFunc f = [&ids](const PEL& pel) {
ids.push_back(pel.id());
return ids.size() == 100 ? true : false;
};

repo.for_each(f);

This will be used to find which PELs still need to be sent up to the
host after a reboot, among other things.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic60525a8ab3dd593ba37e43a6cb0b3db8dda7cee