The general entrance of getting next step according to RL model, and return the next operation step in json format \param descContent XML of the current page, in string format \param activity activity name \param deviceID The default value is "", you could provide your intended ID \return the next operation step in json format
| 37 | /// \param deviceID The default value is "", you could provide your intended ID |
| 38 | /// \return the next operation step in json format |
| 39 | std::string Model::getOperate(const std::string &descContent, const std::string &activity, |
| 40 | const std::string &deviceID) //the entry for getting a new operation |
| 41 | { |
| 42 | const std::string &descContentCopy = descContent; |
| 43 | ElementPtr elem = Element::createFromXml( |
| 44 | descContentCopy); // get the xml object with tinyxml2 |
| 45 | if (nullptr == elem) |
| 46 | return ""; |
| 47 | return this->getOperate(elem, activity, deviceID); |
| 48 | } |
| 49 | |
| 50 | |
| 51 | #define DefaultDeviceID "0000001" |
no test coverage detected