Added externs declarations to header files to handle C++ compilation.

Cleaned up BACnet/IP API a little.
This commit is contained in:
skarg
2005-08-13 14:10:21 +00:00
parent fdbe2eab1e
commit 2e87236e9b
36 changed files with 307 additions and 76 deletions
+22
View File
@@ -38,11 +38,16 @@
#include <stdint.h>
#include <stddef.h>
#include "bacdef.h"
#include "net.h"
// specific defines for Ethernet
#define MAX_HEADER (1 + 1 + 2)
#define MAX_MPDU (MAX_HEADER+MAX_PDU)
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
// note: define init and cleanup in your ports section
bool bip_init(void);
@@ -74,8 +79,25 @@ void bip_set_address(uint8_t octet1, uint8_t octet2,
void bip_set_broadcast_address(uint8_t octet1, uint8_t octet2,
uint8_t octet3, uint8_t octet4);
// use host byte order for setting
void bip_set_port(uint16_t port);
// returns host byte order
uint16_t bip_get_port(void);
// use network byte order for setting
void bip_set_addr(uint32_t net_address);
// returns host byte order
uint32_t bip_get_addr(void);
// use network byte order for setting
void bip_set_broadcast_addr(uint32_t net_address);
// returns host byte order
uint32_t bip_get_broadcast_addr(void);
void bip_set_interface_name(char *ifname);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif