Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-trx/+/43108?usp=email )
Change subject: libosmo-trx/client: add TRXC client (command queue) API ......................................................................
Patch Set 1:
(4 comments)
File libosmo-trx/include/osmocom/trx/trxc_client.h:
https://gerrit.osmocom.org/c/osmo-trx/+/43108/comment/7ee841b0_1d42ce2b?usp=... : PS1, Line 32: struct osmo_trxc_client_ops { I'd rather add APIs to set each callbacks and private pointers, as done in osmo_stream, to allow for future extensions more easily.
File libosmo-trx/src/trxc_client.c:
https://gerrit.osmocom.org/c/osmo-trx/+/43108/comment/abf617ca_0c65a80c?usp=... : PS1, Line 190: void osmo_trxc_client_set_retrans(struct osmo_trxc_client *client, unsigned int sec) set_restrans_timeout?Is 0 allowed? document it and if not allowed return an error.
https://gerrit.osmocom.org/c/osmo-trx/+/43108/comment/f9eb6ba4_d5d43498?usp=... : PS1, Line 267: void osmo_trxc_client_flush(struct osmo_trxc_client *client) See osmo-pcap.git src/osmo_pcap_wr_file.c on how to accomplish it, eg. osmo_pcap_wr_file_flush(), osmo_pcap_wr_file_set_flush_completed_cb(), etc.
https://gerrit.osmocom.org/c/osmo-trx/+/43108/comment/98bb68ed_e44784a9?usp=... : PS1, Line 481: client->setformat_ver_req = ver_max; I'd rather store the user cb + cb_data in a struct, pass it to osmo_trxc_client_send_cmd() below instead of NULL, and free in setformat_rsp_cb(), to avoid several calls to osmo_trxc_client_negotiate_format() tweak the pointer. This way each call has its proper cmd+resp callbck.