21#ifndef STEAM_PLAY_DIAGNOSTIC_OUTPUT_SLOT_H
22#define STEAM_PLAY_DIAGNOSTIC_OUTPUT_SLOT_H
44#include <unordered_set>
64 using std::shared_ptr;
71 Symbol gridID(
"DiagnosticOutputSlot-buffer-grid");
73 PGrid testGrid25 = query4grid.
getAdvice();
76 testGrid25 = TimeGrid::build (gridID, FrameRate::PAL);
109 TRACE (
test,
"Con=%p : track buffer %zu for frame-#%lu"
110 ,
this, newBuffer.
entryID(), frameNr);
112 "attempt to lock already used frame %lu", frameNr);
134 TRACE (
test,
"Con=%p : lock buffer for frame-#%lu",
this, frameNr);
145 TRACE (
test,
"Con=%p : timely? frame-#%lu"
157 TRACE (
test,
"Con=%p : transfer buffer %zu"
158 ,
this, filledBuffer.
entryID());
193 INFO (engine_dbg,
"building in-memory diagnostic output sequence (at %p)",
this);
199 INFO (engine_dbg,
"releasing diagnostic output sequence (at %p)",
this);
226 TRACE (
test,
"query wasAllocated. Con=%p",
this);
235 return unConst(
this)->buffProvider_.accessAs<
TestFrame> (frameNr);
241 return unConst(
this)->buffProvider_.access_emitted (bufferNr);
326 REQUIRE (!
isFree(),
"diagnostic OutputSlot not (yet) connected");
Expecting Advice and giving Advice: a cross-cutting collaboration of loosely coupled participants.
A front-end to support the buffer management within the render nodes.
Iteration source interface to abstract a data source, which then can be accessed through IterAdapter ...
static iterator build(IterSource &sourceImpl)
build an iterator frontend for the given source,
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Simple vector based collection of pointers, managing lifecycle of the pointed-to objects.
T & manage(T *obj)
take ownership of the given object, adding it at the end of the collection
Token or Atom with distinct identity.
Framerate specified as frames per second.
basic constant internal time value.
static const Time ANYTIME
border condition marker value. ANYTIME <= any time value
Access point for the advised entity (client).
AD const & getAdvice() const
An opaque descriptor to identify the type and further properties of a data buffer.
Handle for a buffer for processing data, abstracting away the actual implementation.
void emitBuffer(BuffHandle const &)
BufferProvider API: state transition to emitted state.
BuffHandle lockBuffer(BuffDescr const &)
BufferProvider API: retrieve a single buffer for exclusive use.
void releaseBuffer(BuffHandle const &)
BufferProvider API: declare done and detach.
simple BufferProvider implementation with additional allocation tracking.
size_t emittedCnt() const
Helper for implementing a diagnostic BufferProvider: A block of heap allocated storage,...
Mock data frame for simulated rendering.
diagnostic facility to verify test data frames written to this Test/Dummy "output".
virtual Pos firstResult() override
iteration start: prepare the first element.
OutputFramesLog(TrackingInMemoryBlockSequence const &bs)
TrackingInMemoryBlockSequence const & outSeq_
virtual void nextResult(Pos &pos) override
iteration step: switch on to the next element.
Special diagnostic connection state implementation, establishing diagnostic output connections for ea...
void buildConnection(ConnectionStorage storage)
factory function to build the actual connection handling objects per channel
SimulatedOutputSequences(uint numChannels)
ConnectionManager< TrackingInMemoryBlockSequence > _Base
Helper for unit tests: Mock output sink.
TrackingInMemoryBlockSequence const & accessSequence(uint channel)
bool output_was_emitted(uint channel, FrameID outputFrame)
uint getOutputChannelCount()
OutputFramesLog::iterator OutFrames
static const uint MAX_CHANNELS
OutFrames getChannel(uint channel)
static OutputSlot & build()
build a new Diagnostic Output Slot instance, discard the existing one.
ConnectionState * buildState()
hook into the OutputSlot frontend
bool frame_was_allocated(uint channel, FrameID nominalFrame)
bool output_was_closed(uint channel, FrameID outputFrame)
static DiagnosticOutputSlot & access(OutputSlot &to_investigate)
Maintaining a list of active connections.
Connections::ElementHolder & ConnectionStorage
Base for OutputSlot standard implementation.
Interface: Generic output sink.
unique_ptr< ConnectionState > state_
bool isFree() const
can this OutputSlot be allocated?
Diagnostic output connection for a single channel, allowing to track generated frames and verify the ...
void pushout(BuffHandle const &data4output)
TestFrame const & accessFrame(uint frameNr) const
std::unordered_set< FrameID > FrameTrackingInfo
bool isTimely(FrameID frameNr, TimeValue currentTime)
TrackingHeapBlockProvider buffProvider_
diagn::Block const * accessEmittedBuffer(uint bufferNr) const
TrackingInMemoryBlockSequence()
TimeValue deadlineFor(FrameID frameNr)
virtual ~TrackingInMemoryBlockSequence()
void transfer(BuffHandle const &filledBuffer)
BuffHandle trackFrame(FrameID frameNr, BuffHandle const &newBuffer)
void discard(BuffHandle const &superseededData)
BuffHandle claimBufferFor(FrameID frameNr)
FrameTrackingInfo frameTrackingIndex_
TestFrame const * accessEmittedFrame(uint frameNr) const
bool wasAllocated(uint frameNr) const
diagn::Block const & accessBlock(uint bufferNr) const
Any copy and copy construction prohibited.
Lumiera error handling (C++ interface).
Extension module to build an opaque data source, accessible as Lumiera Forward Iterator.
This header is for including and configuring NoBug.
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
OBJ * unConst(const OBJ *)
shortcut to save some typing when having to define const and non-const variants of member functions
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Interface for concrete output implementations to talk to the OutputSlot frontend.
An (abstract) capability to send media data to an external output.
Managing lifecycle for a collection of objects.
Marker types to indicate a literal string and a Symbol.
Unit test helper to generate fake test data frames.
To establish a reference scale for quantised time values.
a family of time value like entities and their relationships.
Dummy implementation of the BufferProvider interface to support writing unit tests.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...