|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Tick source that reads raw OHLCVTick bytes from a named pipe / FIFO. More...
#include <tick_source.hpp>
Public Member Functions | |
| PipeTickSource (const std::string &name, unsigned int timeout_ms=5000) noexcept | |
| Open the named pipe / FIFO for reading. | |
| ~PipeTickSource () noexcept override | |
| std::optional< OHLCVTick > | read () noexcept override |
| Read the next OHLCVTick from the source. | |
| bool | is_open () const noexcept override |
| Whether the source is still usable. | |
| void | close () noexcept override |
| Close the source and release any OS resources. | |
Public Member Functions inherited from srfm::stream::TickSource | |
| virtual | ~TickSource () noexcept=default |
Tick source that reads raw OHLCVTick bytes from a named pipe / FIFO.
Wire protocol: little-endian binary, exactly sizeof(OHLCVTick) bytes per tick. No framing header — the ingester detects malformed ticks via tick_is_valid().
On Windows: uses a named pipe (\\.\pipe\<name>). On POSIX: uses a named FIFO at path <name>.
Definition at line 159 of file tick_source.hpp.
|
inlineexplicitnoexcept |
Open the named pipe / FIFO for reading.
| name | Pipe name (Windows) or FIFO path (POSIX). Windows: omit the \.\pipe\ prefix — it is added automatically. POSIX: full path, e.g. "/tmp/srfm_ticks". |
On Windows, waits up to timeout_ms for the server to create the pipe. On POSIX, the FIFO must already exist (call mkfifo before constructing).
Definition at line 171 of file tick_source.hpp.
|
inlineoverridenoexcept |
Definition at line 176 of file tick_source.hpp.
|
inlineoverridevirtualnoexcept |
Close the source and release any OS resources.
Safe to call multiple times.
Implements srfm::stream::TickSource.
Definition at line 199 of file tick_source.hpp.
|
inlineoverridevirtualnoexcept |
Whether the source is still usable.
Returns false after a permanent error or after close() is called.
Implements srfm::stream::TickSource.
Definition at line 191 of file tick_source.hpp.
|
inlineoverridevirtualnoexcept |
Read the next OHLCVTick from the source.
Implements srfm::stream::TickSource.
Definition at line 178 of file tick_source.hpp.