12 #ifndef ROC_NODE_RECEIVER_H_
13 #define ROC_NODE_RECEIVER_H_
73 void* slot_metrics_arg,
75 size_t* party_metrics_size,
76 void* party_metrics_arg);
103 : core::RefCounted<Slot, core::PoolAllocation>(pool)
118 return index1 == index2;
123 void update_compatibility_(
address::Interface iface,
const address::EndpointUri& uri);
125 core::SharedPtr<Slot> get_slot_(
slot_index_t slot_index,
bool auto_create);
126 void cleanup_slot_(Slot& slot);
127 void break_slot_(Slot& slot);
129 virtual void schedule_task_processing(pipeline::PipelineLoop&,
131 virtual void cancel_task_processing(pipeline::PipelineLoop&);
135 pipeline::ReceiverLoop pipeline_;
136 ctl::ControlLoop::Tasks::PipelineProcessing processing_task_;
138 core::SlabPool<Slot> slot_pool_;
139 core::Hashmap<Slot> slot_map_;
144 pipeline::ReceiverSlotMetrics slot_metrics_;
145 core::Array<pipeline::ReceiverParticipantMetrics, 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.
bool has_broken()
Check if there are broken slots.
ROC_ATTR_NODISCARD bool unlink(slot_index_t slot_index)
Remove slot.
ROC_ATTR_NODISCARD bool configure(slot_index_t slot_index, address::Interface iface, const netio::UdpConfig &config)
Set interface config.
ROC_ATTR_NODISCARD bool bind(slot_index_t slot_index, address::Interface iface, address::EndpointUri &uri)
Bind to local endpoint.
uint64_t slot_index_t
Slot index.
void(* slot_metrics_func_t)(const pipeline::ReceiverSlotMetrics &slot_metrics, void *slot_arg)
Callback for slot metrics.
Receiver(Context &context, const pipeline::ReceiverSourceConfig &pipeline_config)
Initialize.
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.
void(* party_metrics_func_t)(const pipeline::ReceiverParticipantMetrics &party_metrics, size_t party_index, void *party_arg)
Callback for participant metrics.
bool is_valid()
Check if successfully constructed.
sndio::ISource & source()
Get receiver source.
Pipeline task scheduler interface. PipelineLoop uses this interface to schedule asynchronous work....
struct SlotHandle * SlotHandle
Opaque slot handle.
struct SlotHandle * SlotHandle
Opaque slot handle.
Pipeline task scheduler interface.
@ Iface_Max
Number of interfaces.
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.
Receiver-side metrics specific to one participant (remote sender).
Receiver-side metrics of the whole slot.
Parameters of receiver session.