16
16
#include <libsbp/common.h>
17
17
#include <libsbp/legacy/callbacks.h>
18
18
19
+ SBP_MESSAGE (
20
+ "The legacy libsbp API has been deprecated. This file and all symbols contained will "
21
+ "be removed in version 6. You should immediately switch over to the modern libsbp API." )
22
+
19
23
#ifdef __cplusplus
20
24
extern "C" {
21
25
#endif
@@ -36,7 +40,7 @@ extern "C" {
36
40
* `SBP_CALLBACK_ERROR` if the callback was already
37
41
* registered for that message type.
38
42
*/
39
- SBP_EXPORT s8 sbp_payload_callback_register (sbp_state_t * s , u16 msg_type , sbp_msg_callback_t cb , void * context ,
43
+ SBP_EXPORT SBP_DEPRECATED s8 sbp_payload_callback_register (sbp_state_t * s , u16 msg_type , sbp_msg_callback_t cb , void * context ,
40
44
sbp_msg_callbacks_node_t * node );
41
45
42
46
/** Register a frame callback for a msg_type.
@@ -51,7 +55,7 @@ SBP_EXPORT s8 sbp_payload_callback_register(sbp_state_t* s, u16 msg_type, sbp_ms
51
55
* `SBP_CALLBACK_ERROR` if the if callback was already
52
56
* registered for that message type.
53
57
*/
54
- SBP_EXPORT s8 sbp_frame_callback_register (sbp_state_t * s , u16 msg_type ,
58
+ SBP_EXPORT SBP_DEPRECATED s8 sbp_frame_callback_register (sbp_state_t * s , u16 msg_type ,
55
59
sbp_frame_callback_t cb , void * context ,
56
60
sbp_msg_callbacks_node_t * node );
57
61
@@ -64,7 +68,7 @@ SBP_EXPORT s8 sbp_frame_callback_register(sbp_state_t* s, u16 msg_type,
64
68
* \return `SBP_OK` (0) if successful, `SBP_NULL_ERROR` if a usage error,
65
69
* `SBP_CALLBACK_ERROR` if the node already exists
66
70
*/
67
- SBP_EXPORT s8 sbp_all_payload_callback_register (sbp_state_t * s , sbp_frame_callback_t cb ,
71
+ SBP_EXPORT SBP_DEPRECATED s8 sbp_all_payload_callback_register (sbp_state_t * s , sbp_frame_callback_t cb ,
68
72
void * context , sbp_msg_callbacks_node_t * node );
69
73
70
74
/** Directly process an SBP frame.
@@ -87,7 +91,7 @@ SBP_EXPORT s8 sbp_all_payload_callback_register(sbp_state_t *s, sbp_frame_callba
87
91
* SBP_OK_CALLBACK_UNDEFINED` (2) if message decoded with no
88
92
* associated callback.
89
93
*/
90
- SBP_EXPORT s8 sbp_frame_process (sbp_state_t * s , u16 sender_id , u16 msg_type ,
94
+ SBP_EXPORT SBP_DEPRECATED s8 sbp_frame_process (sbp_state_t * s , u16 sender_id , u16 msg_type ,
91
95
u8 payload_len , u8 payload [], u16 frame_len , u8 frame [], u8 cb_mask );
92
96
93
97
/** Directly process an SBP message.
@@ -103,7 +107,7 @@ SBP_EXPORT s8 sbp_frame_process(sbp_state_t *s, u16 sender_id, u16 msg_type,
103
107
* `SBP_OK_CALLBACK_UNDEFINED` (2) if message decoded with no associated
104
108
* callback.
105
109
*/
106
- SBP_EXPORT s8 sbp_payload_process (sbp_state_t * s , u16 sender_id , u16 msg_type , u8 msg_len ,
110
+ SBP_EXPORT SBP_DEPRECATED s8 sbp_payload_process (sbp_state_t * s , u16 sender_id , u16 msg_type , u8 msg_len ,
107
111
u8 payload []);
108
112
109
113
/** Send SBP messages.
@@ -135,7 +139,7 @@ SBP_EXPORT s8 sbp_payload_process(sbp_state_t *s, u16 sender_id, u16 msg_type, u
135
139
* \return `SBP_OK` (0) if successful, `SBP_WRITE_ERROR` if the message could
136
140
* not be sent or was only partially sent.
137
141
*/
138
- SBP_EXPORT s8 sbp_payload_send (sbp_state_t * s , u16 msg_type , u16 sender_id , u8 len , u8 * payload ,
142
+ SBP_EXPORT SBP_DEPRECATED s8 sbp_payload_send (sbp_state_t * s , u16 msg_type , u16 sender_id , u8 len , u8 * payload ,
139
143
sbp_write_fn_t write );
140
144
141
145
#ifdef __cplusplus
0 commit comments