template struct DataPortHandle¶
Overview¶
Helper structure managing data and ports associated with a port id. More…
#include <input_node.h> template <class DATA> struct DataPortHandle { // fields std::shared_ptr<OutputPort<DATA>> singlePort; std::shared_ptr<OutputPort<std::vector<const DATA*>>> listPort; // construction DataPortHandle(); DataPortHandle( const std::string& id, ComputationalNode* parent, size_t queue_size ); // methods void publishLast(); void publishAll(); void publishNullandClear(); bool addMsg(const DATA* msg); void clear(); size_t size(); };
Detailed Documentation¶
Helper structure managing data and ports associated with a port id.
Fields¶
std::shared_ptr<OutputPort<DATA>> singlePort
Port used to send a single msg.
std::shared_ptr<OutputPort<std::vector<const DATA*>>> listPort
Port used to send a list of msgs.
Construction¶
DataPortHandle( const std::string& id, ComputationalNode* parent, size_t queue_size )
Constructor.
Methods¶
void publishLast()
Publish last item in data.
void publishAll()
Publish all items in data.
void publishNullandClear()
Publish a null pointer.
bool addMsg(const DATA* msg)
Add a new message to the stored data.
void clear()
Clear data.
size_t size()
Return the size of stored data.