Holds context necessary for processing a measure request to completion.
More...
#include <rtctk/componentFramework/measurable.hpp>
Holds context necessary for processing a measure request to completion.
It is meant to encapsulate the life time of a request and provides methods to set result with deferred sending (mainly to trigger any serialization error in the activity thread) as well as sending exceptional replies.
- See also
- rtctk::componentFramework::Measurable
◆ MeasureContext() [1/2]
| rtctk::componentFramework::detail::MeasureContext::MeasureContext |
( |
const rad::cii::Request< std::string, std::string > & | request | ) |
|
|
inlineexplicit |
Construct context with provided request.
- Parameters
-
| request | containing JSON encoded string with arguments. |
- Exceptions
-
| JsonPayload::parse_error | if parsing fails. |
◆ MeasureContext() [2/2]
| rtctk::componentFramework::detail::MeasureContext::MeasureContext |
( |
MeasureContext && | | ) |
|
|
defaultnoexcept |
◆ GetArg()
| const JsonPayload & rtctk::componentFramework::detail::MeasureContext::GetArg |
( |
| ) |
const |
|
inlinenoexcept |
◆ SendErrorReply()
| void rtctk::componentFramework::detail::MeasureContext::SendErrorReply |
( |
std::exception_ptr | eptr | ) |
|
|
inlinenoexcept |
If reply is pending, set exception to the provided value.
◆ SendReply()
| void rtctk::componentFramework::detail::MeasureContext::SendReply |
( |
| ) |
|
|
inlinenoexcept |
Send reply using result set with SetResult().
- Exceptions
-
| boost::promise_already_satisfied | if reply has already been set. |
◆ SetResult()
Sets serialized reply from JSON payload, but does not send it.
- Parameters
-
| result | JSON result that will be serialized and stored as a string. |
- Exceptions
-
| JsonPayload::exception | if reply cannot be serialized to JSON. |
The documentation for this class was generated from the following file:
- componentFramework/rtcComponent/lib/src/include/rtctk/componentFramework/measurable.hpp