- Objective
- Routing_batch main functions
- Subscribe to Batch Processing
- Send channel label batch processing
- Accept channel label Batch processing
- Send stream Batch Processing
Objective
When using the Dante device for routing, the official demo API interface is a peer-to-peer commit subscription. When the devices in the network and the channels needed for routing increase rapidly, the development of peer-to-peer traversal submission subscription is somewhat inadequate.
Problem
Is there a way to quickly send all the accepted channels directly on the transmit channel?
After some investigation, the routing_batch.h of the Dante SDK header file came into my view.
The following is mainly the official description of the routing_batch.h file to do a Chinese and supplement, English better children's shoes, please bypass
Routing_batch main functions
Routing_batch provides routing types and definitions for batch processing . These features allow for efficient configuration of multiple features of the device. The batch function (and the way) and the normal case of running the routing API are slightly different
Before sending a batch configuration message, Routing_batch is not required to obtain the performance of the device (capabilities). However, if the device performance information is not obtained, the Routing_batch API will not provide any error checking (for channel IDs, etc.) or attempt to update the internal state of the device. Note that the remote device must prioritize the IP address of the device to perform batch operations.
The API does not copy any batch data that is provided by the host application inside the function. However, it is assumed that the information (data passed into the API) will persist and remain valid until the request has been completed. Therefore, the host application cannot alter or release the request by providing the batch data until the completion callback is called or the host application has explicitly canceled through the function dr_device_cancel_request () function . This requirement is necessary because the API is intended to thoroughly configure multiple messages that the device may need to send and receive.
Subscribe to Batch Processing
aud_error_tdr_device_batch_subscribe( dr_device_t * device, dr_device_response_fn * response_fn, dante_request_id_t * request_id, uint16_t num_subscriptions, dr_batch_subscription_t * subscriptions);
Related instructions
- Provide batch subscriptions operation to the device
*
- Device handle required to be configured @device
- The callback function after the @response_fn function finishes executing
- @request_id request identifier
- @num_subscriptions number of subscriptions batches processed
- @subscriptions subscriptions during batch processing. Must not be empty
Note
*API, using a pointer copy of subscriptions (shallow copy), but no copy of the array contents (deep copy). Parameter pointers cannot be released or modified while Dr_device_batch_subscribe is in process. The no-function will appear an exception.
Send channel label batch processing
aud_error_tdr_device_batch_txlabel( dr_device_t * device, dr_device_response_fn * response_fn, dante_request_id_t * request_id, uint16_t num_labels, const dr_batch_txlabel_t * labels);
Related instructions
- Send channel label batch processing
- Device handle required to be configured @device
- The callback function after the @response_fn function finishes executing
- @request_id request identifier
- @num_labels number of labels that require batch processing
- @Labels the label in the batch operation. Must not be empty
Note:
During function execution, do not modify the parameter contents (multithreading is unsafe) until the callback is completed. Please refer to dr_device_batch_subscribe 's note description
Accept channel label Batch processing
aud_error_tdr_device_batch_rxlabel( dr_device_t * device, dr_device_response_fn * response_fn, dante_request_id_t * request_id, uint16_t num_labels, const dr_batch_rxlabel_t * labels);
Related instructions
Note:
During function execution, do not modify the parameter contents (multithreading is unsafe) until the callback is completed. Please refer to dr_device_batch_subscribe 's note description
Send stream Batch Processing
aud_error_tdr_device_batch_txflow( dr_device_t * device, dr_device_response_fn * response_fn, dante_request_id_t * request_id, uint16_t num_flows, const dr_batch_txflow_t * flows);
Related instructions
Batch processing of Streams
- Device handle required to be configured @device
- The callback function after the @response_fn function finishes executing
- @request_id request identifier
- @Num_flows The number of "streams" that require batch processing
- @flows "Flow" handle. Must not be empty
Note:
During function execution, do not modify the parameter contents (multithreading is unsafe) until the callback is completed. Please refer to dr_device_batch_subscribe 's note description
A small analysis of Dante routing batch processing