Merged revision(s) 3160 from branches/releases/bacnet-stack-0-8-0:
Added BACDL_NONE for testing without a physical datalink. ........
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
see datalink.h for possible defines. */
|
see datalink.h for possible defines. */
|
||||||
#if !(defined(BACDL_ETHERNET) || defined(BACDL_ARCNET) || \
|
#if !(defined(BACDL_ETHERNET) || defined(BACDL_ARCNET) || \
|
||||||
defined(BACDL_MSTP) || defined(BACDL_BIP) || defined(BACDL_BIP6) || \
|
defined(BACDL_MSTP) || defined(BACDL_BIP) || defined(BACDL_BIP6) || \
|
||||||
defined(BACDL_TEST) || defined(BACDL_ALL))
|
defined(BACDL_TEST) || defined(BACDL_ALL) || defined(BACDL_NONE))
|
||||||
#define BACDL_BIP
|
#define BACDL_BIP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -89,8 +89,7 @@ extern void routed_get_my_address(
|
|||||||
#define datalink_get_broadcast_address bip6_get_broadcast_address
|
#define datalink_get_broadcast_address bip6_get_broadcast_address
|
||||||
#define datalink_get_my_address bip6_get_my_address
|
#define datalink_get_my_address bip6_get_my_address
|
||||||
|
|
||||||
|
#elif defined(BACDL_ALL) || defined(BACDL_NONE)
|
||||||
#else /* Ie, BACDL_ALL */
|
|
||||||
#include "npdu.h"
|
#include "npdu.h"
|
||||||
|
|
||||||
#define MAX_HEADER (8)
|
#define MAX_HEADER (8)
|
||||||
|
|||||||
@@ -31,17 +31,16 @@
|
|||||||
License.
|
License.
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
####COPYRIGHTEND####*/
|
####COPYRIGHTEND####*/
|
||||||
|
/** @file datalink.c Optional run-time assignment of datalink transport */
|
||||||
|
#include "datalink.h"
|
||||||
|
|
||||||
|
#if defined(BACDL_ALL) || defined FOR_DOXYGEN
|
||||||
#include "ethernet.h"
|
#include "ethernet.h"
|
||||||
#include "bip.h"
|
#include "bip.h"
|
||||||
#include "bvlc.h"
|
#include "bvlc.h"
|
||||||
#include "arcnet.h"
|
#include "arcnet.h"
|
||||||
#include "dlmstp.h"
|
#include "dlmstp.h"
|
||||||
#include "datalink.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/** @file datalink.c Optional run-time assignment of datalink transport */
|
|
||||||
|
|
||||||
#if defined(BACDL_ALL) || defined FOR_DOXYGEN
|
|
||||||
/* Function pointers - point to your datalink */
|
/* Function pointers - point to your datalink */
|
||||||
|
|
||||||
/** Function template to Initialize the DataLink services at the given interface.
|
/** Function template to Initialize the DataLink services at the given interface.
|
||||||
@@ -131,3 +130,48 @@ void datalink_set(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(BACDL_NONE)
|
||||||
|
int datalink_send_pdu(
|
||||||
|
BACNET_ADDRESS * dest,
|
||||||
|
BACNET_NPDU_DATA * npdu_data,
|
||||||
|
uint8_t * pdu,
|
||||||
|
unsigned pdu_len)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t datalink_receive(
|
||||||
|
BACNET_ADDRESS * src,
|
||||||
|
uint8_t * pdu,
|
||||||
|
uint16_t max_pdu,
|
||||||
|
unsigned timeout)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void datalink_cleanup(
|
||||||
|
void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void datalink_get_broadcast_address(
|
||||||
|
BACNET_ADDRESS * dest)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void datalink_get_my_address(
|
||||||
|
BACNET_ADDRESS * my_address)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void datalink_set_interface(
|
||||||
|
char *ifname)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void datalink_set(
|
||||||
|
char *datalink_string)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user