* Send a chunk of logic sample data to a running decoder session. * * If no channel map has been set up, the logic samples must be arranged * in channel order, in the least amount of space possible. The default * channel set consists of all required channels + all optional channels. * * The size of a sample in inbuf is 'unitsize' bytes. If no channel map * has been configured, it is the min
| 272 | * @since 0.4.0 |
| 273 | */ |
| 274 | SRD_API int srd_session_send(struct srd_session *sess, |
| 275 | uint64_t abs_start_samplenum, uint64_t abs_end_samplenum, |
| 276 | const uint8_t **inbuf, const uint8_t *inbuf_const, uint64_t inbuflen, char **error) |
| 277 | { |
| 278 | GSList *d; |
| 279 | int ret; |
| 280 | |
| 281 | if (!sess) |
| 282 | return SRD_ERR_ARG; |
| 283 | |
| 284 | //foreach srd_decoder_inst* stack |
| 285 | for (d = sess->di_list; d; d = d->next) { |
| 286 | if ((ret = srd_inst_decode(d->data, abs_start_samplenum, |
| 287 | abs_end_samplenum, inbuf, inbuf_const, inbuflen, error)) != SRD_OK) |
| 288 | return ret; |
| 289 | } |
| 290 | |
| 291 | return SRD_OK; |
| 292 | } |
| 293 | |
| 294 | /** |
| 295 | * Terminate currently executing decoders in a session, reset internal state. |
no test coverage detected