Functions | |
| int | dsi_stream_create (dsi_component_t *sender, dsi_component_t *receiver, l4dm_dataspace_t ctrl, l4dm_dataspace_t data, dsi_stream_t **stream) |
| Create application stream and connect send/receive component. | |
| int | dsi_stream_start (dsi_stream_t *stream) |
| Send start messages to send/receive components. | |
| int | dsi_stream_stop (dsi_stream_t *stream) |
| stop the transfer on a stream
This function calls the stop-functions provided on dsi_stream_create() to stop the data transfer. It is up to the two components to react in a reasonable way, dsi does not check anything, it just calls the functions, first sender, receiver then. | |
| int | dsi_stream_close (dsi_stream_t *stream) |
| Close stream. | |
| int | dsi_stream_select (dsi_select_socket_t *sockets, const int num_sockets, dsi_select_socket_t *events, int *num_events) |
| Wait for component events. | |
Streams connect a send and a receive socket. Usually, they are created by in-the-middle client applications.
| int dsi_stream_close | ( | dsi_stream_t * | stream | ) |
Close stream.
| stream | Stream descriptor |
-L4_EINVAL invalid socket descriptor-DSI_ECOMPONENT component operation failedDefinition at line 335 of file app.c.
References dsi_component::close, dsi_is_valid_stream(), dsi_stream::flags, dsi_stream::receiver, dsi_stream::sender, dsi_component::socketref, dsi_component::stop, and dsi_socket_ref::work_th.
| int dsi_stream_create | ( | dsi_component_t * | sender, | |
| dsi_component_t * | receiver, | |||
| l4dm_dataspace_t | ctrl, | |||
| l4dm_dataspace_t | data, | |||
| dsi_stream_t ** | stream | |||
| ) |
Create application stream and connect send/receive component.
| sender | description of send component | |
| receiver | description od receive component | |
| ctrl | control area | |
| data | data area |
| 0 | success, created stream, stream contains stream descriptor | |
| -L4_EINVAL | invalid component / dataspace descriptors | |
| -DSI_ECONNECT | connect call to sender or receiver failed | |
| -DSI_ENOSTREAM | no stream descriptor available |
Definition at line 132 of file app.c.
References __allocate_stream(), dsi_stream::__private, dsi_component::connect, dsi_stream::ctrl, dsi_stream::data, dsi_is_valid_component(), dsi_stream::flags, dsi_stream::receiver, dsi_stream::sender, and dsi_component::socketref.
| int dsi_stream_select | ( | dsi_select_socket_t * | sockets, | |
| const int | num_sockets, | |||
| dsi_select_socket_t * | events, | |||
| int * | num_events | |||
| ) |
Wait for component events.
| sockets | Socket list, the struct must contain:
| |
| num_sockets | Number of sockets |
| events | Event list, it contains all sockets for which an event was received, the elements are:
| |
| num_events | Number of sockets for which an event was received. |
-L4_EINVAL invalid stream descriptor-L4_ENOTHREAD create select thread failed-L4_EBUSY someone else already waiting for one of the events-L4_EIPC IPC error calling componentDefinition at line 126 of file select.c.
References __select_thread(), dsi_select_socket::component, dsi_create_select_thread(), dsi_event_reset(), dsi_is_valid_stream(), DSI_SEND_COMPONENT, dsi_shutdown_select_thread(), dsi_select_thread_arg::error, dsi_select_socket::events, dsi_select_thread_arg::events, dsi_select_thread_arg::mask, dsi_stream::receiver, dsi_select_thread_arg::sem, dsi_stream::sender, dsi_socket_ref::socket, dsi_select_thread_arg::socket, dsi_component::socketref, and dsi_select_socket::stream.
| int dsi_stream_start | ( | dsi_stream_t * | stream | ) |
Send start messages to send/receive components.
| stream | stream descriptor |
| 0 | success | |
| -L4_EINVAL | invalid stream descriptor |
Definition at line 224 of file app.c.
References dsi_is_valid_stream(), dsi_stream::receiver, dsi_stream::sender, and dsi_component::start.
| int dsi_stream_stop | ( | dsi_stream_t * | stream | ) |
stop the transfer on a stream
This function calls the stop-functions provided on dsi_stream_create() to stop the data transfer. It is up to the two components to react in a reasonable way, dsi does not check anything, it just calls the functions, first sender, receiver then.
| stream | stream descriptor |
| 0 | on success | |
| -L4_EINVAL | invalid stream descriptor |
Definition at line 274 of file app.c.
References dsi_is_valid_stream(), dsi_stream::receiver, dsi_stream::sender, dsi_component::socketref, dsi_component::stop, and dsi_socket_ref::work_th.
1.5.6