diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-12-01 11:02:40 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-12-01 11:02:40 (GMT) |
commit | af6609592298c5e047e37e5ae2b47e6a8edbb677 (patch) | |
tree | e6e7da1cd34dccf3fb4f389e684b7c899b12987a /src/uscxml/Interpreter.cpp | |
parent | d2e90c02e5ad19a5857e7c7fb87f248182fdb32d (diff) | |
download | uscxml-af6609592298c5e047e37e5ae2b47e6a8edbb677.zip uscxml-af6609592298c5e047e37e5ae2b47e6a8edbb677.tar.gz uscxml-af6609592298c5e047e37e5ae2b47e6a8edbb677.tar.bz2 |
Nested invokers and delayed events for PROMELA model checking
Diffstat (limited to 'src/uscxml/Interpreter.cpp')
-rw-r--r-- | src/uscxml/Interpreter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index dc53906..6aca93c 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -1682,6 +1682,8 @@ void InterpreterImpl::send(const Arabica::DOM::Element<std::string>& element) { sendReq.delayMs = strTo<uint32_t>(delayAttr.value); } else if (iequals(delayAttr.unit, "s")) { sendReq.delayMs = strTo<double>(delayAttr.value) * 1000; + } else if (delayAttr.unit.length() == 0) { // unit less delay is interpreted as milliseconds + sendReq.delayMs = strTo<uint32_t>(delayAttr.value); } else { LOG(ERROR) << "Cannot make sense of delay value " << delay << ": does not end in 's' or 'ms'"; } @@ -1784,7 +1786,7 @@ void InterpreterImpl::delayedSend(void* userdata, std::string eventName) { } catch(Event e) { throw e; } catch (const std::exception &e) { - LOG(ERROR) << "Exception caught while sending event to ioprocessor " << sendReq.type << ":" << e.what(); + LOG(ERROR) << "Exception caught while sending event to ioprocessor " << sendReq.type << ": '" << e.what() << "'"; } catch(...) { LOG(ERROR) << "Exception caught while sending event to ioprocessor " << sendReq.type; } @@ -2790,13 +2792,11 @@ NodeSet<std::string> InterpreterImpl::filterChildElements(const std::string& tag return filteredChildElems; } + NodeSet<std::string> InterpreterImpl::filterChildType(const Node_base::Type type, const NodeSet<std::string>& nodeSet, bool recurse) { NodeSet<std::string> filteredChildType; for (unsigned int i = 0; i < nodeSet.size(); i++) { - if (nodeSet[i].getNodeType() == type) - filteredChildType.push_back(nodeSet[i]); - if (recurse) - filteredChildType.push_back(filterChildType(type, nodeSet[i], recurse)); + filteredChildType.push_back(filterChildType(type, nodeSet[i], recurse)); } return filteredChildType; } |