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