BALTECH SDK wrapper functions reference
composite_protocol.h
Go to the documentation of this file.
1 
27 #ifndef __COMPOSITE_PROTOCOL_H__
28 #define __COMPOSITE_PROTOCOL_H__
29 
30 
31 #include "protocol.h"
32 
33 
41 #define BRP_MONITOR_DISABLED 0
42 #define BRP_MONITOR_ENABLED 1
44 #define BRP_MONITOR_PLAINTEXT 2
46 
48 
61 
62 
74 BRP_LIB brp_protocol brp_create(void);
75 
76 
87 (
88  brp_protocol composite_protocol,
89  brp_layer_id layer_id
91 );
94 
95 
123 (
124  brp_protocol composite_protocol,
125  brp_layer_id layer_id,
126  brp_protocol layer_protocol
129 );
130 
131 
139 (
140  brp_protocol composite_protocol,
141  brp_layer_id layer_id
143 );
146 
147 
167 (
168  brp_protocol composite_protocol,
169  brp_layer_id layer_id
171 );
175 
176 
188 BRP_LIB brp_errcode brp_set_io
189 (
190  brp_protocol protocol,
191  brp_protocol io_protocol
193 );
194 
195 
208 (
209  brp_protocol composite_protocol,
210  brp_protocol crypto_protocol
211 );
213 
214 
224 
225 
236  brp_protocol protocol,
237  int mode
238 );
239 
240 
241 
251 brp_protocol require_protocol
252 (
253  brp_protocol protocol,
254  int protocol_id,
255  brp_layer_id layer_id
256 );
257 
258 
264 #endif
265  // end of defgroup brp_lib
BRP_LIB brp_errcode brp_add_layer(brp_protocol composite_protocol, brp_layer_id layer_id)
Adds a protocol layer without assigning a protocol to it.
int brp_layer_id
identifies the layer of a composite protocol stack (see brp_create() or brp_create_composite().
Definition: protocol.h:42
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
This file primarly defines the common part of all protocol's data structures (:brp_protocol_t) and AP...
BRP_LIB brp_protocol brp_create(void)
This is equivalent to the following call:
BRP_LIB brp_errcode brp_set_crypto(brp_protocol composite_protocol, brp_protocol crypto_protocol)
Assigns a crypto protocol to a composite protocol (protocol stack).
BRP_LIB brp_protocol brp_get_layer(brp_protocol composite_protocol, brp_layer_id layer_id)
Retrieves a protocol layer from a composite protocol.
BRP_LIB brp_protocol brp_create_composite(void)
Creates an empty composite protocol.
BRP_LIB brp_errcode brp_set_io(brp_protocol protocol, brp_protocol io_protocol)
Assigns an I/O protocol to a composite protocol (protocol stack).
BRP_LIB brp_errcode brp_suppress_monitoring(brp_protocol protocol)
Disables the monitoring feature of this library.
BRP_LIB brp_errcode brp_set_layer(brp_protocol composite_protocol, brp_layer_id layer_id, brp_protocol layer_protocol)
Adds/replaces a protocol layer to a composite protocol.
BRP_LIB brp_protocol brp_detach_layer(brp_protocol composite_protocol, brp_layer_id layer_id)
Removes a protocol from a composite protocol stack without destroying.
BRP_LIB brp_errcode brp_set_monitor(brp_protocol protocol, int mode)
When communicating encrypted (see brp_set_crypto()) the monitoring feature of this library logs the p...