RTXI  3.0.0
The Real-Time eXperiment Interface Reference Manual
Public Member Functions
RT::OS::xenomaiFifo Class Reference
Inheritance diagram for RT::OS::xenomaiFifo:
Inheritance graph
Collaboration diagram for RT::OS::xenomaiFifo:
Collaboration graph

Public Member Functions

 xenomaiFifo (size_t size)
 
 xenomaiFifo (const xenomaiFifo &fifo)=delete
 
xenomaiFifooperator= (const xenomaiFifo &fifo)=delete
 
 xenomaiFifo (xenomaiFifo &&)=default
 
xenomaiFifooperator= (xenomaiFifo &&)=default
 
 ~xenomaiFifo () override
 
int64_t read (void *buf, size_t buf_size) override
 
int64_t write (void *buf, size_t buf_size) override
 
int64_t readRT (void *buf, size_t buf_size) override
 
int64_t writeRT (void *buf, size_t buf_size) override
 
void poll () override
 
void close () override
 
int buffer_fd () const
 
size_t getCapacity () override
 
- Public Member Functions inherited from RT::OS::Fifo
 Fifo ()=default
 
 Fifo (const Fifo &fifo)=delete
 
Fifooperator= (const Fifo &fifo)=delete
 
 Fifo (Fifo &&)=default
 
Fifooperator= (Fifo &&)=default
 
virtual ~Fifo ()=default
 

Detailed Description

Definition at line 40 of file fifo_xenomai.cpp.

Constructor & Destructor Documentation

◆ xenomaiFifo() [1/3]

RT::OS::xenomaiFifo::xenomaiFifo(size_t size)
explicit

Definition at line 71 of file fifo_xenomai.cpp.

Here is the call graph for this function:

◆ xenomaiFifo() [2/3]

RT::OS::xenomaiFifo::xenomaiFifo(const xenomaiFifofifo)
delete

◆ xenomaiFifo() [3/3]

RT::OS::xenomaiFifo::xenomaiFifo(xenomaiFifo && )
default

◆ ~xenomaiFifo()

RT::OS::xenomaiFifo::~xenomaiFifo()
override

Definition at line 90 of file fifo_xenomai.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ buffer_fd()

int RT::OS::xenomaiFifo::buffer_fd()const

Definition at line 134 of file fifo_xenomai.cpp.

◆ close()

void RT::OS::xenomaiFifo::close()
overridevirtual

Closes the handle stored and prevents reading from the ui side

Implements RT::OS::Fifo.

Definition at line 139 of file fifo_xenomai.cpp.

◆ getCapacity()

size_t RT::OS::xenomaiFifo::getCapacity()
overridevirtual

Get the memory capacity of the fifo

Returns
The maximum amount of memory the fifo can hold

Implements RT::OS::Fifo.

Definition at line 146 of file fifo_xenomai.cpp.

◆ operator=() [1/2]

xenomaiFifo& RT::OS::xenomaiFifo::operator=(const xenomaiFifofifo)
delete

◆ operator=() [2/2]

xenomaiFifo& RT::OS::xenomaiFifo::operator=(xenomaiFifo && )
default

◆ poll()

void RT::OS::xenomaiFifo::poll()
overridevirtual

Checks whether there is available data to read on the non-rt side

This function is primarily for non-rt threads to wait on available data from the rt thread. It blocks (sleeps) the calling thread until woken by data availability. SHOULD NOT RUN IN REAL TIME!!

Implements RT::OS::Fifo.

Definition at line 122 of file fifo_xenomai.cpp.

Here is the call graph for this function:

◆ read()

int64_t RT::OS::xenomaiFifo::read(void * buf,
size_t data_size 
)
overridevirtual

Read the data stored in the FIFO written by realtime thread. Must be run from non-rt thread.

Parameters
bufThe buffer where the data from the buffer should be written to
data_sizeThe size of the data to read from the buffer
Returns
n Number of elements read. Same as size.

Implements RT::OS::Fifo.

Definition at line 100 of file fifo_xenomai.cpp.

◆ readRT()

int64_t RT::OS::xenomaiFifo::readRT(void * buf,
size_t data_size 
)
overridevirtual

Read the data stored in the FIFO written by non-RT thread. Must be run from realtime thread.

Parameters
bufThe buffer where the data from the buffer should be written to
data_sizeThe size of the data to read from the buffer
Returns
n Number of elements read. Same as size.

Implements RT::OS::Fifo.

Definition at line 112 of file fifo_xenomai.cpp.

◆ write()

int64_t RT::OS::xenomaiFifo::write(void * buf,
size_t data_size 
)
overridevirtual

Write to the FIFO storage for the realtime thread. Must be run from non-rt thread.

Parameters
bufThe buffer holding the data to write to the FIFO.
data_sizeThe size of the data to read from the buffer
Returns
n Number of elements written. Same as size.

Implements RT::OS::Fifo.

Definition at line 106 of file fifo_xenomai.cpp.

◆ writeRT()

int64_t RT::OS::xenomaiFifo::writeRT(void * buf,
size_t data_size 
)
overridevirtual

Write to the FIFO storage for the non-RT thread. Must be run from realtime thread.

Parameters
bufThe buffer holding the data to write to the FIFO.
data_sizeThe size of the data to read from the buffer
Returns
n Number of elements written. Same as size.

Implements RT::OS::Fifo.

Definition at line 117 of file fifo_xenomai.cpp.


The documentation for this class was generated from the following file: