12 #ifndef ROC_NODE_SENDER_H_
13 #define ROC_NODE_SENDER_H_
75 void* slot_metrics_arg,
77 size_t* party_metrics_size,
78 void* party_metrics_arg);
98 , outbound_writer(NULL) {
111 : core::RefCounted<Slot, core::PoolAllocation>(pool)
126 return index1 == index2;
131 void update_compatibility_(
address::Interface iface,
const address::EndpointUri& uri);
133 core::SharedPtr<Slot> get_slot_(
slot_index_t slot_index,
bool auto_create);
134 void cleanup_slot_(Slot& slot);
135 void break_slot_(Slot& slot);
139 bool setup_outgoing_port_(Port& port,
143 virtual void schedule_task_processing(pipeline::PipelineLoop&,
145 virtual void cancel_task_processing(pipeline::PipelineLoop&);
149 pipeline::SenderLoop pipeline_;
150 ctl::ControlLoop::Tasks::PipelineProcessing processing_task_;
152 core::SlabPool<Slot> slot_pool_;
153 core::Hashmap<Slot> slot_map_;
158 pipeline::SenderSlotMetrics slot_metrics_;
159 core::Array<pipeline::SenderParticipantMetrics, 8> party_metrics_;
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Base class for Hashmap element.
Base class for object with reference counter.
struct PortHandle * PortHandle
Opaque port handle.
Context & context()
All nodes hold reference to context.
ROC_ATTR_NODISCARD bool connect(slot_index_t slot_index, address::Interface iface, const address::EndpointUri &uri)
Connect to remote endpoint.
bool is_valid() const
Check if successfully constructed.
bool has_broken()
Check if there are broken slots.
Sender(Context &context, const pipeline::SenderSinkConfig &pipeline_config)
Initialize.
ROC_ATTR_NODISCARD bool unlink(slot_index_t slot_index)
Remove slot.
void(* party_metrics_func_t)(const pipeline::SenderParticipantMetrics &party_metrics, size_t party_index, void *party_arg)
Callback for participant metrics.
ROC_ATTR_NODISCARD bool get_metrics(slot_index_t slot_index, slot_metrics_func_t slot_metrics_func, void *slot_metrics_arg, party_metrics_func_t party_metrics_func, size_t *party_metrics_size, void *party_metrics_arg)
Get metrics.
ROC_ATTR_NODISCARD bool configure(slot_index_t slot_index, address::Interface iface, const netio::UdpConfig &config)
Set interface config.
bool has_incomplete()
Check if there are incomplete or broken slots.
uint64_t slot_index_t
Slot index.
void(* slot_metrics_func_t)(const pipeline::SenderSlotMetrics &slot_metrics, void *slot_arg)
Callback for slot metrics.
sndio::ISink & sink()
Get sender sink.
Pipeline task scheduler interface. PipelineLoop uses this interface to schedule asynchronous work....
struct SlotHandle * SlotHandle
Opaque slot handle.
Pipeline task scheduler interface.
@ Iface_Max
Number of interfaces.
AddrFamily
Address family.
hashsum_t hashsum_int(int16_t)
Compute hash of 16-bit integer.
int64_t nanoseconds_t
Nanoseconds.
size_t hashsum_t
Hash type.
Base class for object with reference counter.
Commonly used types and functions.
Sender-side metrics specific to one participant (remote receiver).
Parameters of sender sink and sender session.
Sender-side metrics of the whole slot.