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