|
CIRCT 24.0.0git
|
#include <TypedPorts.h>


Public Types | |
| using | DataFetchCallback = std::function<std::unique_ptr<T>()> |
| Callback mode data source: returns the next value to write, or nullptr if none is available yet. | |
Public Member Functions | |
| TypedWritePort (WriteChannelPort &port) | |
| TypedWritePort (WriteChannelPort *port) | |
| void | connect (const ChannelPort::ConnectOptions &opts={std::nullopt, false}) |
| void | connect (DataFetchCallback fetch, WriteChannelPort::WriteErrorCallback onError, const ChannelPort::ConnectOptions &opts={std::nullopt, false}) |
| Connect in callback mode. | |
| void | notifyAsyncDataAvailable () |
| See WriteChannelPort::notifyAsyncDataAvailable(). | |
| void | write (const T &data) |
| void | write (std::unique_ptr< T > &data) |
| Write by taking ownership. | |
| bool | tryWrite (const T &data) |
| bool | tryWrite (std::unique_ptr< T > &data) |
| Non-blocking write by taking ownership. | |
| bool | flush () |
| void | disconnect () |
| bool | isConnected () const |
| WriteChannelPort & | raw () |
| const WriteChannelPort & | raw () const |
Private Attributes | |
| WriteChannelPort * | inner |
| WireInfo | wireInfo_ |
Definition at line 604 of file TypedPorts.h.
| using esi::TypedWritePort< T, SkipTypeCheck >::DataFetchCallback = std::function<std::unique_ptr<T>()> |
Callback mode data source: returns the next value to write, or nullptr if none is available yet.
See WriteChannelPort::DataFetchCallback.
Definition at line 622 of file TypedPorts.h.
|
inlineexplicit |
Definition at line 606 of file TypedPorts.h.
References inner.
|
inline |
Definition at line 608 of file TypedPorts.h.
References inner.
|
inline |
Definition at line 610 of file TypedPorts.h.
Referenced by autoSerialCoordTranslateTest(), runCustomServiceDeclChannel(), runLoopbackI8(), serialCoordTranslate(), and serialCoordTranslateTest().
|
inline |
Connect in callback mode.
If T is a SegmentedMessageData, fetched messages are handed to the port as-is; otherwise they are serialized. See WriteChannelPort::connect(DataFetchCallback, WriteErrorCallback, const ConnectOptions &).
Definition at line 629 of file TypedPorts.h.
|
inline |
Definition at line 708 of file TypedPorts.h.
References inner.
Referenced by autoSerialCoordTranslateTest(), and serialCoordTranslateTest().
|
inline |
Definition at line 707 of file TypedPorts.h.
References inner.
|
inline |
Definition at line 709 of file TypedPorts.h.
References inner.
|
inline |
See WriteChannelPort::notifyAsyncDataAvailable().
Definition at line 658 of file TypedPorts.h.
References inner.
|
inline |
Definition at line 711 of file TypedPorts.h.
References inner.
|
inline |
Definition at line 712 of file TypedPorts.h.
References inner.
|
inline |
Definition at line 675 of file TypedPorts.h.
References inner, esi::toMessageData(), and wireInfo_.
Referenced by tryWrite().
|
inline |
Non-blocking write by taking ownership.
On success, data is consumed (left null) and true is returned. On failure, data is left untouched so the caller can retry. If T is a SegmentedMessageData, this hands the message directly to the port's segmented tryWrite path.
Definition at line 683 of file TypedPorts.h.
References inner, and tryWrite().
|
inline |
Definition at line 660 of file TypedPorts.h.
References inner, esi::toMessageData(), and wireInfo_.
Referenced by autoSerialCoordTranslateTest(), runCustomServiceDeclChannel(), runLoopbackI8(), serialCoordTranslate(), serialCoordTranslateTest(), and write().
|
inline |
Write by taking ownership.
If T is a SegmentedMessageData, this hands the message directly to the port's segmented write path.
Definition at line 664 of file TypedPorts.h.
|
private |
Definition at line 715 of file TypedPorts.h.
Referenced by disconnect(), flush(), isConnected(), notifyAsyncDataAvailable(), raw(), raw(), tryWrite(), tryWrite(), TypedWritePort(), TypedWritePort(), write(), and write().
|
private |
Definition at line 716 of file TypedPorts.h.
Referenced by tryWrite(), and write().