Modify C header files to include from C++ code
This commit is contained in:
parent
ee6241c331
commit
72341baea5
@ -65,6 +65,10 @@
|
|||||||
|
|
||||||
#include "mbus-protocol.h"
|
#include "mbus-protocol.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MBUS_PROBE_NOTHING 0
|
#define MBUS_PROBE_NOTHING 0
|
||||||
#define MBUS_PROBE_SINGLE 1
|
#define MBUS_PROBE_SINGLE 1
|
||||||
#define MBUS_PROBE_COLLISION 2
|
#define MBUS_PROBE_COLLISION 2
|
||||||
@ -433,4 +437,8 @@ char * mbus_frame_data_xml_normalized(mbus_frame_data *data);
|
|||||||
*/
|
*/
|
||||||
int mbus_scan_2nd_address_range(mbus_handle * handle, int pos, char *addr_mask);
|
int mbus_scan_2nd_address_range(mbus_handle * handle, int pos, char *addr_mask);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // __MBUS_PROTOCOL_AUX_H__
|
#endif // __MBUS_PROTOCOL_AUX_H__
|
||||||
|
@ -22,6 +22,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Packet formats:
|
// Packet formats:
|
||||||
//
|
//
|
||||||
@ -633,5 +637,9 @@ u_char mbus_dif_datalength_lookup(u_char dif);
|
|||||||
char *mbus_frame_get_secondary_address(mbus_frame *frame);
|
char *mbus_frame_get_secondary_address(mbus_frame *frame);
|
||||||
int mbus_frame_select_secondary_pack(mbus_frame *frame, char *address);
|
int mbus_frame_select_secondary_pack(mbus_frame *frame, char *address);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _MBUS_PROTOCOL_H_ */
|
#endif /* _MBUS_PROTOCOL_H_ */
|
||||||
|
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
#include "mbus-protocol-aux.h"
|
#include "mbus-protocol-aux.h"
|
||||||
#include "mbus-protocol.h"
|
#include "mbus-protocol.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mbus_serial_data
|
typedef struct _mbus_serial_data
|
||||||
{
|
{
|
||||||
char *device;
|
char *device;
|
||||||
@ -34,6 +39,11 @@ int mbus_serial_send_frame(mbus_handle *handle, mbus_frame *fram
|
|||||||
int mbus_serial_recv_frame(mbus_handle *handle, mbus_frame *frame);
|
int mbus_serial_recv_frame(mbus_handle *handle, mbus_frame *frame);
|
||||||
int mbus_serial_set_baudrate(mbus_handle *handle, int baudrate);
|
int mbus_serial_set_baudrate(mbus_handle *handle, int baudrate);
|
||||||
void mbus_serial_data_free(mbus_handle *handle);
|
void mbus_serial_data_free(mbus_handle *handle);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* MBUS_SERIAL_H */
|
#endif /* MBUS_SERIAL_H */
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,6 +21,11 @@
|
|||||||
#include "mbus-protocol.h"
|
#include "mbus-protocol.h"
|
||||||
#include "mbus-protocol-aux.h"
|
#include "mbus-protocol-aux.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mbus_tcp_data
|
typedef struct _mbus_tcp_data
|
||||||
{
|
{
|
||||||
char *host;
|
char *host;
|
||||||
@ -33,6 +38,10 @@ int mbus_tcp_send_frame(mbus_handle *handle, mbus_frame *frame);
|
|||||||
int mbus_tcp_recv_frame(mbus_handle *handle, mbus_frame *frame);
|
int mbus_tcp_recv_frame(mbus_handle *handle, mbus_frame *frame);
|
||||||
void mbus_tcp_data_free(mbus_handle *handle);
|
void mbus_tcp_data_free(mbus_handle *handle);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* MBUS_TCP_H */
|
#endif /* MBUS_TCP_H */
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,9 +38,17 @@
|
|||||||
#include <mbus/mbus-tcp.h>
|
#include <mbus/mbus-tcp.h>
|
||||||
#include <mbus/mbus-serial.h>
|
#include <mbus/mbus-serial.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
int mbus_init();
|
int mbus_init();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _MBUS_H_ */
|
#endif /* _MBUS_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user