- if(regex_match(line, regex(".*Element\\d+.*value=.*Element\\d+.*->\\d+.*"))){
- int tmp=0, index=0, value=0;
- const char* s = line.c_str();
- uint i1, i2, i3;
- uint64_t i4;
- if (4 == sscanf(s,"%*[^0123456789]%u%*[^0123456789]%d%*[^0123456789]%d%*[^0123456789]%" PRId64 "", &i1, &i2, &i3, &i4)){
- model_print("Element%d = %" PRId64 "\n", i1, i4);
- sigEnc.setValue(i1, i4);
+ if(regex_match(line, regex(".*Element.*value=.*Element\\d+.*->\\d+.*"))){
+ vector<string> values;
+ const char delim = ',';
+ tokenize(line, delim, values);
+ for (uint i=0; i<values.size(); i++){
+ uint i1, i2;
+ uint64_t i3;
+ if (3 == sscanf(values[i].c_str(),"%*[^0123456789]%d%*[^0123456789]%d%*[^0123456789]%" PRId64 "", &i1, &i2, &i3)){
+ model_print("Element%d = %" PRId64 "\n", i1, i3);
+ sigEnc.setValue(i1, i3);
+ }