MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ complete_request()

bool MayaFlux::Core::SerialDevice::complete_request ( Transitive::Protocol::Message frame)
private

Definition at line 215 of file SerialDevice.cpp.

216{
217 std::shared_ptr<Pending> request;
218 if (const auto held = m_pending.read()) {
219 request = *held;
220 }
221 if (!request || !request->matcher(frame)) {
222 return false;
223 }
224
225 if (!take_pending(request)) {
226 return false;
227 }
229 return true;
230}
Memory::SnapshotCell< std::shared_ptr< Pending > > m_pending
std::shared_ptr< Pending > take_pending(const std::shared_ptr< Pending > &only={})
void end_request(const std::shared_ptr< Pending > &request, SerialReply how, Transitive::Protocol::Message reply)
bool request(std::span< const uint8_t > command, ReplyMatcher matcher, std::chrono::milliseconds timeout, ReplyCallback done)
Send a command and wait for its reply.
@ REPLIED
A message the matcher accepted arrived.

References complete_request(), end_request(), m_pending, MayaFlux::Core::REPLIED, request(), and take_pending().

Referenced by complete_request(), and SerialDevice().

Here is the call graph for this function:
Here is the caller graph for this function: