Skip to content
Permalink
6b251c1401
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (25 sloc) 746 Bytes
#include "AlgoBreadcrumbs.hpp"
#include "BreadcrumbsConstants.hpp"
void AlgoBreadcrumbs::loop()
{
int msgCount = 0;
Attribute msgCountAttrib = { "MSGCOUNT", sizeof(int), &msgCount };
map<string, Attribute> attribs = pollForAttributesMap();
if (attribs.size() > 0)
{
auto testKeyIter = attribs.find(string("testKey1"));
if (testKeyIter != attribs.end())
{
char value = *((char*) (*testKeyIter).second.getValue());
cout << "Test key 1 value updated to " << value << endl;
}
sendAttribute(msgCountAttrib);
}
int degree = 0;
Attribute degreeAttrib = { ATTRKEY_EATAC_DEGREE, sizeof(double), &degree };
sendAttribute(degreeAttrib);
}
bool AlgoBreadcrumbs::loopCondition()
{
return true;
}