Writes frames to ValkkaFS.
More...
#include <valkkafs.h>
|
|
void | handleSignal (ValkkaFSWriterSignalContext &signal_ctx) |
| | Handle an individual signal. Signal can originate from the frame fifo or from the signal_fifo deque.
|
| |
|
void | handleSignals () |
| | Call ValkkaFSWriterThread::handleSignal for every signal in the signal_fifo.
|
| |
|
void | saveCurrentBlock (bool pycall=true, bool use_gil=true) |
| |
|
void | setSlotId (SlotNumber slot, IdNumber id) |
| |
|
void | unSetSlotId (SlotNumber slot) |
| |
|
void | clearSlotId () |
| |
|
void | reportSlotId () |
| |
|
void | seek (std::size_t n_block) |
| |
|
void | mainRun () |
| | Does the preRun, run, postRun sequence.
|
| |
|
void | closeThread () |
| | Sends exit signal to the thread, calls join. This method blocks until thread has exited. Set Thread::has_thread to false.
|
| |
|
|
ValkkaFS & | valkkafs |
| |
|
RaWriter | raw_writer |
| |
|
std::map< SlotNumber, IdNumber > | slot_to_id |
| | Map from slot numbers to ids.
|
| |
|
std::size_t | bytecount |
| |
|
FrameFifo | infifo |
| | Incoming frames are read from here.
|
| |
|
FifoFrameFilter | infilter |
| | Write incoming frames here // TODO: add a chain of correcting FrameFilter(s)
|
| |
|
BlockingFifoFrameFilter | infilter_block |
| | Incoming frames can also be written here. If stack runs out of frames, writing will block.
|
| |
|
std::deque< ValkkaFSWriterSignalContext > | signal_fifo |
| | Redefinition of signal fifo.
|
| |
|
std::string | name |
| | Name of the thread.
|
| |
|
bool | has_thread |
| | true if thread has been started
|
| |
|
bool | stop_requested |
| |
|
bool | thread_joined |
| |
|
std::mutex | start_mutex |
| | Mutex protecting start_condition.
|
| |
|
std::condition_variable | start_condition |
| | Notified when the thread has been started.
|
| |
|
std::mutex | mutex |
| | Mutex protecting the condition variable and signal queue.
|
| |
|
std::condition_variable | condition |
| | Condition variable for the signal queue (triggered when all signals processed). Not necessarily used by all subclasses.
|
| |
|
std::mutex | loop_mutex |
| | Protects thread's main execution loop (if necessary)
|
| |
|
std::deque< SignalContext > | signal_fifo |
| | Signal queue (fifo). Redefine in child classes.
|
| |
|
bool | loop |
| | Use this boolean to control if the main loop in Thread:run should exit.
|
| |
|
int | core_id |
| |
|
pthread_attr_t | thread_attr |
| | Thread attributes, pthread_* way.
|
| |
|
cpu_set_t | cpuset |
| |
|
pthread_t | internal_thread |
| |
|
|
static void * | mainRun_ (void *p) |
| |
Writes frames to ValkkaFS.
- Reads frames from infifo
- Writes them to the disk as they arrive
- Uses a ValkkaFS instance for book-keeping
◆ requestStopCall()
| void ValkkaFSWriterThread::requestStopCall |
( |
| ) |
|
|
virtual |
API method: stops the thread.
Like Thread::stopCall() but does not block. Waiting for the thread to join is done in Thread::waitStoppedCall()
Reimplemented from Thread.
◆ run()
| void ValkkaFSWriterThread::run |
( |
| ) |
|
|
virtual |
Main execution loop is defined here.
Implements Thread.
The documentation for this class was generated from the following files: