![]() |
SolarCapture C Bindings User Guide
SF-115721-CD
Issue 1
|
sc_session: A set of threads and other objects. More...
Data Structures | |
struct | sc_session_error |
A SolarCapture session error object returned by sc_session_error_get. More... | |
Functions | |
int | sc_session_alloc (struct sc_session **scs_out, const struct sc_attr *attr) |
Allocate a SolarCapture session. More... | |
int | sc_session_prepare (struct sc_session *scs) |
Prepare a SolarCapture session. More... | |
int | sc_session_go (struct sc_session *scs) |
Start a SolarCapture session. More... | |
int | sc_session_pause (struct sc_session *scs) |
Pause a SolarCapture session. More... | |
struct sc_session_error * | sc_session_error_get (struct sc_session *scs) |
Returns an error from a SolarCapture session. More... | |
void | sc_session_error_free (struct sc_session *scs, struct sc_session_error *err) |
Frees an error object. More... | |
sc_session: A set of threads and other objects.
int sc_session_alloc | ( | struct sc_session ** | scs_out, |
const struct sc_attr * | attr | ||
) |
Allocate a SolarCapture session.
scs_out | The allocated session object is returned here |
attr | Attributes for the new session |
This function allocates a SolarCapture session.
A session comprises a set of threads, VIs, nodes and/or other SolarCapture objects.
void sc_session_error_free | ( | struct sc_session * | scs, |
struct sc_session_error * | err | ||
) |
Frees an error object.
scs | The session |
err | The error |
Frees a sc_session_error pointer returned by sc_session_error_get.
struct sc_session_error* sc_session_error_get | ( | struct sc_session * | scs | ) |
Returns an error from a SolarCapture session.
scs | The session |
scs
. The caller should pass the pointer to sc_session_error_free once once done with it.int sc_session_go | ( | struct sc_session * | scs | ) |
Start a SolarCapture session.
scs | The session |
Prepare the session scs
(if necessary) and start the managed threads. This is usually called just once, after allocating resources. It can also be called after sc_session_pause() to restart a paused session.
int sc_session_pause | ( | struct sc_session * | scs | ) |
Pause a SolarCapture session.
scs | The session |
Pause the threads managed by session scs
.
int sc_session_prepare | ( | struct sc_session * | scs | ) |
Prepare a SolarCapture session.
scs | The session |
Prepare the session scs
. This step includes finalising resource allocations, preparing nodes, and starting packet capture. Managed threads are started in the "paused" state.
Note that although packet capture is started, you may get packet loss if the threads managing 'sc_vi's are not started soon afterwards.
Call sc_session_go() to start the managed threads and begin packet processing.