MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / srd_session_start

Function srd_session_start

libsigrokdecode4DSL/session.c:102–122  ·  view source on GitHub ↗

* Start a decoding session. * * Decoders, instances and stack must have been prepared beforehand, * and all SRD_CONF parameters set. * * @param sess The session to start. Must not be NULL. * * @return SRD_OK upon success, a (negative) error code otherwise. * * @since 0.3.0 */

Source from the content-addressed store, hash-verified

100 * @since 0.3.0
101 */
102SRD_API int srd_session_start(struct srd_session *sess, char **error)
103{
104 GSList *d;
105 struct srd_decoder_inst *di;
106 int ret;
107
108 if (!sess)
109 return SRD_ERR_ARG;
110
111 srd_info("Calling start() of all instances in session %d.", sess->session_id);
112
113 /* Run the start() method of all decoders receiving frontend data. */
114 ret = SRD_OK;
115 for (d = sess->di_list; d; d = d->next) {
116 di = d->data;
117 if ((ret = srd_inst_start(di, error)) != SRD_OK)
118 break;
119 }
120
121 return ret;
122}
123
124static int srd_inst_send_meta(struct srd_decoder_inst *di, int key,
125 GVariant *data)

Callers 1

execute_decode_stackMethod · 0.85

Calls 1

srd_inst_startFunction · 0.85

Tested by

no test coverage detected