47 std::optional<UnirecRecordView>
receive();
A class that provides a bidirectional interface for sending and receiving unirec records.
ur_template_t * m_template
void setSendAutoflushTimeout(int timeout)
Sets the autoflush timeout for the output Trap interface.
~UnirecBidirectionalInterface()
Destructor for the UnirecBidirectionalInterface class.
bool handleSendErrorCodes(int errorCode) const
ur_template_t * getTemplate() const noexcept
Gets the Unirec template used by the bidirectional interface.
void handleReceiveErrorCodes(int errorCode) const
void sendFlush() const
Flushes any pending UniRec records in the Trap interface.
void changeTemplate()
Changes the Unirec template used by the bidirectional interface.
void changeInternalTemplate(const std::string &templateSpecification)
InputInteraceStats getInputInterfaceStats() const
Gets the statistics for the input interface.
void setReceiveTimeout(int timeout)
Sets the receive timeout for the interface. This method sets the timeout for receiving UniRec records...
const void * m_prioritizedDataPointer
UnirecRecord createUnirecRecord(size_t maxVariableFieldsSize=UR_MAX_SIZE)
Creates a new UniRec record with the specified maximum variable fields size.
UnirecRecord m_unirecRecord
void doNotsendEoFOnExit()
Disables sending an end-of-file marker on exit.
bool isEoFReceived() const noexcept
void setSendTimeout(int timeout)
Sets the send timeout for the Trap interface.
uint8_t m_inputInterfaceID
uint8_t m_outputInterfaceID
std::optional< UnirecRecordView > receive()
Receives data from the interface and returns an optional UnirecRecordView object.
UnirecRecord & getUnirecRecord() noexcept
Gets a reference to the pre-allocated UniRec record for efficient use.
void setRequieredFormat(const std::string &templateSpecification)
Sets the required Unirec format specification.
uint64_t m_sequenceNumber
bool send(UnirecRecord &unirecRecord) const
Sends a UniRec record through the Trap interface.
UnirecBidirectionalInterface(uint8_t inputInterfaceID, uint8_t outputInterfaceID)
Provides a view into a UniRec record.
A class for working with UniRec records and their fields.
This file contains the declarations of the interface stats structure.
Defines custom exception classes.
Provides a view into a UniRec record.
Defines the UnirecRecord class.
Definition of UniRec structures and functions.
UniRec template. It contains a table mapping a field to its position in an UniRec record.