Table of Contents

Name

linx.h - The LINX API

Synopsis

#include <linx.h>

Description

This is the main header file for applications, using the liblinx library. This library provides functions to handle communication between LINX endpoints, using a messaging API.
Inclusion of the <linx.h> header may also make all symbols from <stdint.h> , <sys/types.h> and <linx_types.h> visible.

The linx_open() function creates a LINX endpoint, returning a handle, a LINX *, to use in all other LINX API calls.

LINX *linx_open(const char *my_name, uint32_t options, void *arg);

int linx_close(LINX *linx);

int linx_get_descriptor(LINX *linx);

union LINX_SIGNAL *linx_alloc(LINX *linx, LINX_OSBUFSIZE size, LINX_SIGSELECT sig_no);

int linx_free_buf(LINX *linx, union LINX_SIGNAL **sig);

int linx_send(LINX *linx, union LINX_SIGNAL **sig, LINX_SPID to);

int linx_send_w_s(LINX *linx, union LINX_SIGNAL **sig, LINX_SPID from, LINX_SPID to);

int linx_receive(LINX *linx, union LINX_SIGNAL **sig, const LINX_SIGSELECT *sig_sel);

int linx_receive_w_buf(LINX *linx, union LINX_SIGNAL **sig, const LINX_SIGSELECT *sig_sel);

int linx_receive_w_tmo(LINX *linx, union LINX_SIGNAL **sig, const LINX_SIGSELECT *sig_sel, LINX_OSTIME tmo);

int linx_receive_from(LINX *linx, union LINX_SIGNAL **sig, const LINX_SIGSELECT *sig_sel, LINX_OSTIME tmo, LINX_SPID from);

LINX_SPID linx_sender(LINX *linx, union LINX_SIGNAL **sig);

LINX_OSBUFSIZE linx_sigsize(LINX *linx, union LINX_SIGNAL **sig);

int linx_set_sigsize(LINX *linx, union LINX_SIGNAL **sig, LINX_OSBUFSIZE sigsize);

int linx_hunt(LINX *linx, const char *name, union LINX_SIGNAL **hunt_sig);

int linx_hunt_from(LINX *linx, const char *name, union LINX_SIGNAL **hunt_sig, LINX_SPID from);

LINX_OSATTREF linx_attach(LINX *linx, union LINX_SIGNAL **sig, LINX_SPID spid);

int linx_detach(LINX *linx, LINX_OSATTREF *attref);

LINX_SPID linx_get_spid(LINX *linx);

int linx_get_name(LINX *linx, LINX_SPID spid, char **name);

Future Directions

The LINX API is still under development and may be subject to change in future releases.

Known Bugs

None.

Author

Enea LINX team

See Also

linx(7) , linx_open(3) , linx_types.h(3) , linx_close(3) , linx_get_descriptor(3) , linx_alloc(3) , linx_free_buf(3) , linx_send(3) , linx_send_w_s(3) , linx_receive(3) , linx_receive_w_buf(3) , linx_receive_w_tmo(3) , linx_receive_from(3) , linx_sender(3) , linx_sigsize(3) , linx_set_sigsize(3) , linx_hunt(3) , linx_hunt_from(3) , linx_attach(3) , linx_detach(3) , linx_get_spid(3) , linx_get_name(3)

Copyright

Copyright (c) 2006-2007, Enea Software AB All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Enea Software AB nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Table of Contents