f408b6eb7f
* Expanded Object_List to Object_List[MAX_NUM_DEVICES] array to support per-device objects for virtual remote devices * Added multi-device iteration for COV handler, device timer, and intrinsic reporting * Added apps/gateway2 demo application * When MAX_NUM_DEVICES == 1, behavior is identical to the original implementation * Conditional compilation with macros ensures no impact on non-gateway applications --------- Signed-off-by: Hyeongjun Kim <hjun1.kim@samsung.com> Co-authored-by: haemeok-kang <haemeok.kang@samsung.com>
43 lines
1.3 KiB
C
43 lines
1.3 KiB
C
/**
|
|
* @file
|
|
* @brief Header for example gateway (ie, BACnet Router and Devices)
|
|
* using the BACnet Stack.
|
|
* @author Tom Brennan <tbrennan3@users.sourceforge.net>
|
|
* @date 2010
|
|
* @copyright SPDX-License-Identifier: MIT
|
|
*/
|
|
#ifndef BACNET_GATEWAY_H_
|
|
#define BACNET_GATEWAY_H_
|
|
|
|
#include "bacnet/config.h"
|
|
|
|
/** @defgroup GatewayDemo Demo of a BACnet virtual gateway (multiple Device).
|
|
* @ingroup Demos
|
|
* This is a basic demonstration of a BACnet Router with child devices (ie,
|
|
* gateway) appearing on a virtual BACnet network behind the Router.
|
|
* This is an extension of the ServerDemo project.
|
|
*/
|
|
|
|
/* Device configuration definitions. */
|
|
#define FIRST_DEVICE_NUMBER 260001
|
|
#define VIRTUAL_DNET 2709 /* your choice of number here */
|
|
#define DEV_NAME_BASE "Gateway Demo Device"
|
|
#define DEV_DESCR_GATEWAY "Gateway Device and Router"
|
|
#define DEV_DESCR_REMOTE "Routed Remote Device"
|
|
#define VIRTUAL_DEVICE_COUNT 10
|
|
#define VIRTUAL_DEVICE_INDEX_OFFSET 1
|
|
|
|
#if VIRTUAL_DEVICE_COUNT >= MAX_NUM_DEVICES
|
|
#ifdef _MSC_VER
|
|
#pragma message( \
|
|
"VIRTUAL_DEVICE_COUNT >= MAX_NUM_DEVICES, adjusting to MAX_NUM_DEVICES-1")
|
|
#else
|
|
#warning \
|
|
"VIRTUAL_DEVICE_COUNT >= MAX_NUM_DEVICES, adjusting to MAX_NUM_DEVICES-1"
|
|
#endif
|
|
#undef VIRTUAL_DEVICE_COUNT
|
|
#define VIRTUAL_DEVICE_COUNT (MAX_NUM_DEVICES - 1)
|
|
#endif
|
|
|
|
#endif
|