#include <OutputPort.hpp>
OutputPort provides methods to interact with a worker's output ports.
Pothos::OutputPort::~OutputPort |
( |
void |
| ) |
|
Get access to the stream buffer. For non-stream ports, this returns an empty buffer chunk.
const std::string & Pothos::OutputPort::domain |
( |
void |
| ) |
const |
|
inline |
Get the domain information for this port.
Get the data type information for this port.
size_t Pothos::OutputPort::elements |
( |
void |
| ) |
const |
|
inline |
Get the number of elements available in the stream buffer. The number of elements is the available bytes/dtype size.
int Pothos::OutputPort::index |
( |
void |
| ) |
const |
|
inline |
Get the index number of this port. An index of -1 means the port cannot be represented by an integer.
- Returns
- the index or -1
bool Pothos::OutputPort::isSignal |
( |
void |
| ) |
const |
|
inline |
Is this port used for signaling in a signals + slots paradigm?
const std::string & Pothos::OutputPort::name |
( |
void |
| ) |
const |
|
inline |
Get the string name identifier for this port.
void Pothos::OutputPort::popBuffer |
( |
const size_t |
numBytes | ) |
|
|
inline |
Remove all or part of an output buffer from the port; without producing elements for downstream consumers. This call allows the user to use the output buffer for non-streaming purposes, such as an async message. The number of bytes should be less than or equal to the bytes available and a multiple of the element size.
- Parameters
-
numBytes | the number of bytes to remove |
void Pothos::OutputPort::postBuffer |
( |
const BufferChunk & |
buffer | ) |
|
|
inline |
Post an output buffer to the subscribers on this port. This call allows external user-provided buffers to be used in place of the normal stream buffer provided by buffer(). The number of elements to produce is determined from the buffer's length field divided by the dtype size. Do not call produce() when using postBuffer().
- Parameters
-
void Pothos::OutputPort::postLabel |
( |
const Label & |
label | ) |
|
|
inline |
Post an output label to the subscribers on this port.
- Parameters
-
template<typename ValueType >
void Pothos::OutputPort::postMessage |
( |
ValueType && |
message | ) |
|
Post an output message to the subscribers on this port.
- Parameters
-
message | the message to post |
void Pothos::OutputPort::produce |
( |
const size_t |
numElements | ) |
|
|
inline |
Produce elements from this port. The number of elements specified must be less than or equal to the number of elements available.
- Parameters
-
numElements | the number of elements to produce |
void Pothos::OutputPort::setReadBeforeWrite |
( |
InputPort * |
port | ) |
|
|
inline |
Set read before write on this output port. Read before write indicates that an element will be read from the input before a corresponding element is written to an element from this output.
This property implies that the input buffer can be used as an output buffer duing a call to the work operation. Also referred to as buffer inlining, the intention is to keep more memory in cache by using the same buffer for both reading and writing operations when possible.
When this "read before write" property is enabled, and the only reference to the buffer is held by the input port, and the size of the input elements is the same as the output. then the input buffer may be substituted for an output buffer.
- Parameters
-
port | the input port to borrow the buffer from |
unsigned long long Pothos::OutputPort::totalBuffers |
( |
void |
| ) |
const |
|
inline |
Get the total number of buffers produced from this port. This value will increment immediately after postBuffer(). This call will also increment after every work execution where elements are produced using the produce() method.
unsigned long long Pothos::OutputPort::totalElements |
( |
void |
| ) |
const |
|
inline |
Get the total number of elements produced from this port. The value returned by this method will not change until after execution of work() and propagateLabels().
unsigned long long Pothos::OutputPort::totalLabels |
( |
void |
| ) |
const |
|
inline |
Get the total number of labels produced from this port. This value will increment immediately after postLabel().
unsigned long long Pothos::OutputPort::totalMessages |
( |
void |
| ) |
const |
|
inline |
Get the total number of messages posted to this port. The value returned by this method will be incremented immediately upon calling postMessage().
The documentation for this class was generated from the following files: