BALTECH Docs |
C API for BALTECH SDK
|
This file primarly defines the common part of all protocol's data structures (:brp_protocol_t) and API functions to directly interact with protocols (that usually are only required for plugin developers). More...
#include "common.h"
#include "errorcodes.h"
#include "protocol_ids.h"
#include "frames.h"
#include "mempool.h"
Go to the source code of this file.
Typedefs | |
typedef struct brp_protocol_t * | brp_protocol |
This is a generic handle of a protocol. More... | |
typedef int | brp_layer_id |
identifies the layer of a composite protocol stack (see brp_create() or brp_create_composite(). More... | |
Functions | |
BRP_LIB brp_errcode | brp_open (brp_protocol protocol) |
Set up a connection via this protocol. More... | |
BRP_LIB brp_errcode | brp_close (brp_protocol protocol) |
Closes protocol. More... | |
BRP_LIB brp_errcode | brp_flush (brp_protocol) |
Deletes all data that is waiting in input buffers for being read via brp_recv_frame() (or brp_recv_fix_frame() / brp_frecv_any_frame()). More... | |
BRP_LIB brp_errcode | brp_get_io_id (brp_protocol protocol, char **intf_name, brp_frame instance_id) |
Retrieves the instance name of the I/O-protocol of this protocol stack. More... | |
BRP_LIB brp_errcode | brp_destroy (brp_protocol) |
Closes a protocol if opened and frees all allocated resources thereafter. More... | |
This file primarly defines the common part of all protocol's data structures (:brp_protocol_t) and API functions to directly interact with protocols (that usually are only required for plugin developers).
The functions in this module are working as a thin layer on top of each :brp_protocol_t. As every protocol provides a stream like interface this layer handles the necessary buffering to avoid that each protocol implements its own mechanisms. Furthermore these functions do some basic security checks to avoid invalid API calls.
Please notice that all function are starting with a leading brp_*, which means, that they are ony meant for developers of extension protocols.
Definition in file protocol.h.