aes70::response_generator struct
Contents
- Reference
This class is used generate responses to AES70 commands (i.e. RPC calls). It is optionally passed to callees.
Public functions
- auto get_target_ono() const -> uint32_t
- auto get_handle() const -> uint32_t
- auto requires_response() const -> bool
-
auto get_device() const -> aes70::
device:: device& - auto allocate(size_t len, OcaStatus status, uint8_t parameterCount = 0) const -> uint8_t*
- void send() const
-
template<typename Encoder, typename T>auto send_success(uint8_t parameterCount, T&& x) const -> bool
- auto send_status(OcaStatus status) const -> bool
- void failure(OcaStatus status) const
- void success() const
-
template<typename Encoder, typename T>void send_property_changed(const OcaPropertyID& prop, const T& val, OcaPropertyChangeType type = OcaPropertyChangeType::
CurrentChanged) const
Public variables
Function documentation
uint32_t aes70:: response_generator:: get_target_ono() const
Returns the object number this command is targeted at.
uint32_t aes70:: response_generator:: get_handle() const
Returns command handle of this request.
bool aes70:: response_generator:: requires_response() const
True if the command expects a response.
aes70:: device:: device& aes70:: response_generator:: get_device() const
Returns the device.
void aes70:: response_generator:: send() const
Send the response previously allocated.
template<typename Encoder, typename T>
bool aes70:: response_generator:: send_success(uint8_t parameterCount,
T&& x) const
Template parameters | |
---|---|
Encoder | - The OCP1 encoder to use, e.g. OCP1:: |
T | - The type of the return values. Has to be compatible with Encoder. |
Parameters | |
parameterCount | - The number of return values. |
x | - The return value(s). |
Send a response.
bool aes70:: response_generator:: send_status(OcaStatus status) const
Respond with the given status and no return values.
void aes70:: response_generator:: failure(OcaStatus status) const
An alias for send_
void aes70:: response_generator:: success() const
Respond with OcaStatus::OK and no return values.
template<typename Encoder, typename T>
void aes70:: response_generator:: send_property_changed(const OcaPropertyID& prop,
const T& val,
OcaPropertyChangeType type = OcaPropertyChangeType:: CurrentChanged) const
Template parameters | |
---|---|
Encoder | - The OCP1 encoder for the property. |
T | - The type of the value. Has to be supported with Encoder. |
Parameters | |
prop | - The property which changed. |
val | - The value of the property. |
type | - The type of what changed, defaults to OcaPropertyChangeType:: |
Send a property changed event, usually in response to a setter having been called.
Variable documentation
aes70:: device:: connection& aes70:: response_generator:: connection
The connection which initiated the call and on which the response will be sent.