Bugfix/zephyr build for minimal ram (#606)
* Removed BACnet objects from ports/zephyr. There should only be datalink and OS related interfaces in OS ports. * Added Kconfig and bacnet-config.h options in ports/zephyr to keep small footprint for MCUs having less RAM * Changed ports/zephry for BACnet/IP and date-time with latest zephyr OS
This commit is contained in:
-1352
File diff suppressed because it is too large
Load Diff
-1451
File diff suppressed because it is too large
Load Diff
@@ -1,28 +1,14 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (c) 2024 Legrand North America, LLC.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Port specific configuration for BACnet Stack for Zephyr OS
|
||||
* @author Steve Karg
|
||||
* @date 2024
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright (C) 2024 Steve Karg <skarg@users.sourceforge.net>
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#ifndef BACNET_PORTS_ZEPHYR_BACNET_CONFIG_H
|
||||
#define BACNET_PORTS_ZEPHYR_BACNET_CONFIG_H
|
||||
|
||||
@@ -30,6 +16,29 @@
|
||||
#error bacnet-config.h included outside of BACNET_CONFIG_H control
|
||||
#endif
|
||||
|
||||
#include <zephyr/sys/util.h> // Provides platform-specific defn of ARRAY_SIZE()
|
||||
/* provides platform specific define for ARRAY_SIZE */
|
||||
#include <zephyr/sys/util.h>
|
||||
|
||||
#endif // BACNET_PORTS_ZEPHYR_BACNET_CONFIG_H
|
||||
/* some smaller defaults for microcontrollers */
|
||||
#if !defined(MAX_TSM_TRANSACTIONS)
|
||||
#define MAX_TSM_TRANSACTIONS 1
|
||||
#endif
|
||||
#if !defined(MAX_ADDRESS_CACHE)
|
||||
#define MAX_ADDRESS_CACHE 1
|
||||
#endif
|
||||
#if !defined(MAX_CHARACTER_STRING_BYTES)
|
||||
#define MAX_CHARACTER_STRING_BYTES 64
|
||||
#endif
|
||||
#if !defined(MAX_OCTET_STRING_BYTES)
|
||||
#define MAX_OCTET_STRING_BYTES 64
|
||||
#endif
|
||||
|
||||
/* K.6.6 BIBB - Network Management-BBMD Configuration-B (NM-BBMDC-B)*/
|
||||
#if !defined(MAX_BBMD_ENTRIES)
|
||||
#define MAX_BBMD_ENTRIES 5
|
||||
#endif
|
||||
#if !defined(MAX_FD_ENTRIES)
|
||||
#define MAX_FD_ENTRIES 5
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+98
-95
@@ -71,22 +71,21 @@ static struct in_addr BIP_Broadcast_Addr;
|
||||
|
||||
/* Used by inet_ntoa */
|
||||
#if CONFIG_BACNETSTACK_LOG_LEVEL
|
||||
static char ipv4_addr_str[16]={0};
|
||||
static char ipv4_addr_str[16] = { 0 };
|
||||
#else
|
||||
static char ipv4_addr_str[]="";
|
||||
static char ipv4_addr_str[] = "";
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Return a string representation of an IPv4 address
|
||||
* @param a - IPv4 address
|
||||
* @return Pointer to global string
|
||||
*/
|
||||
char* inet_ntoa(struct in_addr *a)
|
||||
* @brief Return a string representation of an IPv4 address
|
||||
* @param a - IPv4 address
|
||||
* @return Pointer to global string
|
||||
*/
|
||||
char *inet_ntoa(struct in_addr *a)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_BACNETSTACK_LOG_LEVEL)) {
|
||||
|
||||
snprintf(ipv4_addr_str, sizeof(ipv4_addr_str), "%d.%d.%d.%d",
|
||||
a->s4_addr[0],a->s4_addr[1],a->s4_addr[2],a->s4_addr[3]);
|
||||
a->s4_addr[0], a->s4_addr[1], a->s4_addr[2], a->s4_addr[3]);
|
||||
}
|
||||
|
||||
return &ipv4_addr_str[0];
|
||||
@@ -97,14 +96,15 @@ char* inet_ntoa(struct in_addr *a)
|
||||
* @param str - debug info string
|
||||
* @param addr - IPv4 address
|
||||
*/
|
||||
static void debug_print_ipv4(const char *str, const struct in_addr *addr,
|
||||
const unsigned int port, const unsigned int count)
|
||||
static void debug_print_ipv4(const char *str,
|
||||
const struct in_addr *addr,
|
||||
const unsigned int port,
|
||||
const unsigned int count)
|
||||
{
|
||||
LOG_DBG("%s %s:%hu (%u bytes)", log_strdup(str), log_strdup(inet_ntoa((struct in_addr*) &addr)),
|
||||
LOG_DBG("%s %s:%hu (%u bytes)", str, inet_ntoa((struct in_addr *)&addr),
|
||||
ntohs(port), count);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Set the BACnet IPv4 UDP port number
|
||||
* @param port - IPv4 UDP port number - in host byte order
|
||||
@@ -169,7 +169,6 @@ void bip_get_broadcast_address(BACNET_ADDRESS *dest)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the BACnet/IP address
|
||||
*
|
||||
@@ -257,7 +256,7 @@ uint8_t bip_get_subnet_prefix(void)
|
||||
if ((address | mask) == broadcast) {
|
||||
break;
|
||||
}
|
||||
mask = mask<<1;
|
||||
mask = mask << 1;
|
||||
}
|
||||
|
||||
return prefix;
|
||||
@@ -290,8 +289,8 @@ int bip_send_mpdu(BACNET_IP_ADDRESS *dest, uint8_t *mtu, uint16_t mtu_len)
|
||||
bip_dest.sin_port = htons(dest->port);
|
||||
|
||||
/* Send the packet */
|
||||
debug_print_ipv4("Sending MPDU->", &bip_dest.sin_addr, bip_dest.sin_port,
|
||||
mtu_len);
|
||||
debug_print_ipv4(
|
||||
"Sending MPDU->", &bip_dest.sin_addr, bip_dest.sin_port, mtu_len);
|
||||
return zsock_sendto(BIP_Socket, (char *)mtu, mtu_len, 0,
|
||||
(struct sockaddr *)&bip_dest, sizeof(struct sockaddr));
|
||||
}
|
||||
@@ -345,19 +344,18 @@ uint16_t bip_receive(
|
||||
|
||||
/* see if there is a packet for us */
|
||||
if (zsock_select(max + 1, &read_fds, NULL, NULL, &select_timeout) > 0) {
|
||||
socket = FD_ISSET(BIP_Socket, &read_fds) ? BIP_Socket :
|
||||
BIP_Broadcast_Socket;
|
||||
received_bytes = zsock_recvfrom(socket, (char *)&npdu[0], max_npdu,
|
||||
0, (struct sockaddr *)&sin, &sin_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
socket =
|
||||
FD_ISSET(BIP_Socket, &read_fds) ? BIP_Socket : BIP_Broadcast_Socket;
|
||||
received_bytes = zsock_recvfrom(socket, (char *)&npdu[0], max_npdu, 0,
|
||||
(struct sockaddr *)&sin, &sin_len);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* See if there is a problem */
|
||||
if (received_bytes < 0) {
|
||||
LOG_WRN("%s:%d - RX zsock_recvfrom() error: %d", THIS_FILE, __LINE__, received_bytes);
|
||||
LOG_WRN("%s:%d - RX zsock_recvfrom() error: %d", THIS_FILE, __LINE__,
|
||||
received_bytes);
|
||||
return 0;
|
||||
}
|
||||
/* no problem, just no bytes */
|
||||
@@ -379,16 +377,16 @@ uint16_t bip_receive(
|
||||
memcpy(&addr.address[0], &sin.sin_addr.s_addr, IP_ADDRESS_MAX);
|
||||
addr.port = ntohs(sin.sin_port);
|
||||
|
||||
debug_print_ipv4("Received MPDU->", &sin.sin_addr, sin.sin_port,
|
||||
received_bytes);
|
||||
debug_print_ipv4(
|
||||
"Received MPDU->", &sin.sin_addr, sin.sin_port, received_bytes);
|
||||
/* pass the packet into the BBMD handler */
|
||||
offset = socket == BIP_Socket ?
|
||||
bvlc_handler(&addr, src, npdu, received_bytes) :
|
||||
bvlc_broadcast_handler(&addr, src, npdu, received_bytes);
|
||||
offset = socket == BIP_Socket
|
||||
? bvlc_handler(&addr, src, npdu, received_bytes)
|
||||
: bvlc_broadcast_handler(&addr, src, npdu, received_bytes);
|
||||
if (offset > 0) {
|
||||
npdu_len = received_bytes - offset;
|
||||
debug_print_ipv4("Received NPDU->", &sin.sin_addr, sin.sin_port,
|
||||
npdu_len);
|
||||
debug_print_ipv4(
|
||||
"Received NPDU->", &sin.sin_addr, sin.sin_port, npdu_len);
|
||||
if (npdu_len <= max_npdu) {
|
||||
/* shift the buffer to return a valid NPDU */
|
||||
for (i = 0; i < npdu_len; i++) {
|
||||
@@ -432,81 +430,89 @@ int bip_send_pdu(BACNET_ADDRESS *dest,
|
||||
*/
|
||||
void bip_set_interface(char *ifname)
|
||||
{
|
||||
struct net_if *interface = 0;
|
||||
struct net_if *iface = 0;
|
||||
int index = -1;
|
||||
uint8_t x=0;
|
||||
|
||||
BACNET_IP_ADDRESS unicast = {0};
|
||||
BACNET_IP_ADDRESS broadcast = {0};
|
||||
uint8_t x = 0;
|
||||
BACNET_IP_ADDRESS unicast = { 0 };
|
||||
BACNET_IP_ADDRESS broadcast = { 0 };
|
||||
|
||||
/* Network byte order */
|
||||
unicast.port = BIP_Port;
|
||||
broadcast.port = BIP_Port;
|
||||
|
||||
LOG_INF("bip_set_interface()");
|
||||
LOG_INF("UDP port: %d", ntohs(BIP_Port));
|
||||
|
||||
if(ifname)
|
||||
{
|
||||
if (ifname) {
|
||||
index = atoi(ifname);
|
||||
|
||||
/* if index is zero, discern between "0" and a parse error */
|
||||
if(!index && strcmp(ifname,"0"))
|
||||
{
|
||||
LOG_ERR("%s:%d - Argument must parse to an integer", THIS_FILE, __LINE__);
|
||||
}
|
||||
else
|
||||
{
|
||||
interface = net_if_get_by_index(index);
|
||||
if(interface)
|
||||
{
|
||||
LOG_INF("Using interface %d", index);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERR("%s:%d - No interface at index %d", THIS_FILE, __LINE__, index);
|
||||
if (!index && strcmp(ifname, "0")) {
|
||||
LOG_ERR("%s:%d - Argument must parse to an integer", THIS_FILE,
|
||||
__LINE__);
|
||||
} else {
|
||||
iface = net_if_get_by_index(index);
|
||||
if (iface) {
|
||||
LOG_INF("Using iface %d", index);
|
||||
} else {
|
||||
LOG_ERR(
|
||||
"%s:%d - No iface at index %d", THIS_FILE, __LINE__, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(index == -1)
|
||||
{
|
||||
LOG_WRN("%s:%d - No valid interface specified - using default ",THIS_FILE, __LINE__);
|
||||
interface = net_if_get_default();
|
||||
if (index == -1) {
|
||||
LOG_WRN("%s:%d - No valid interface specified - using default ",
|
||||
THIS_FILE, __LINE__);
|
||||
iface = net_if_get_default();
|
||||
}
|
||||
if (iface) {
|
||||
LOG_INF("Interface set.");
|
||||
#if defined(CONFIG_BACDL_BIP_ADDRESS_INDEX)
|
||||
LOG_INF("Config unicast address %d/%d",
|
||||
CONFIG_BACDL_BIP_ADDRESS_INDEX, NET_IF_MAX_IPV4_ADDR);
|
||||
index = CONFIG_BACDL_BIP_ADDRESS_INDEX;
|
||||
#else
|
||||
int i;
|
||||
char hr_addr[NET_IPV4_ADDR_LEN];
|
||||
index = 0;
|
||||
for (i = 0; i < NET_IF_MAX_IPV4_ADDR; i++) {
|
||||
struct net_if_addr *if_addr = &iface->config.ip.ipv4->unicast[i];
|
||||
|
||||
if(interface)
|
||||
{
|
||||
LOG_INF("Interface set");
|
||||
|
||||
if(CONFIG_BACDL_BIP_ADDRESS_INDEX >= NET_IF_MAX_IPV4_ADDR)
|
||||
{
|
||||
LOG_ERR("%s:%d - IPv4 address index of %d is out of range (0-%d)",THIS_FILE, __LINE__, CONFIG_BACDL_BIP_ADDRESS_INDEX, NET_IF_MAX_IPV4_ADDR-1);
|
||||
if (!if_addr->is_used) {
|
||||
continue;
|
||||
}
|
||||
index = i;
|
||||
LOG_INF("IPv4 address: %s",
|
||||
net_addr_ntop(AF_INET, &if_addr->address.in_addr, hr_addr,
|
||||
NET_IPV4_ADDR_LEN));
|
||||
LOG_INF("Subnet: %s",
|
||||
net_addr_ntop(AF_INET, &iface->config.ip.ipv4->netmask, hr_addr,
|
||||
NET_IPV4_ADDR_LEN));
|
||||
LOG_INF("Router: %s",
|
||||
net_addr_ntop(AF_INET, &iface->config.ip.ipv4->gw, hr_addr,
|
||||
NET_IPV4_ADDR_LEN));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (index >= NET_IF_MAX_IPV4_ADDR) {
|
||||
LOG_ERR("%s:%d - IPv4 address index of %d is out of range (0-%d)",
|
||||
THIS_FILE, __LINE__, index, NET_IF_MAX_IPV4_ADDR - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_INF("Using IPv4 address at index %d", CONFIG_BACDL_BIP_ADDRESS_INDEX);
|
||||
|
||||
LOG_INF("Using IPv4 address at index %d", index);
|
||||
/* Build the broadcast address from the unicast and netmask */
|
||||
for(x=0; x<IP_ADDRESS_MAX; x++)
|
||||
{
|
||||
broadcast.address[x] = interface->config.ip.ipv4->unicast[CONFIG_BACDL_BIP_ADDRESS_INDEX].address.in_addr.s4_addr[x] |
|
||||
~interface->config.ip.ipv4->netmask.s4_addr[x];
|
||||
|
||||
unicast.address[x] = interface->config.ip.ipv4->unicast[CONFIG_BACDL_BIP_ADDRESS_INDEX].address.in_addr.s4_addr[x];
|
||||
struct net_if_addr *if_addr = &iface->config.ip.ipv4->unicast[index];
|
||||
for (x = 0; x < IP_ADDRESS_MAX; x++) {
|
||||
unicast.address[x] = if_addr->address.in_addr.s4_addr[x];
|
||||
broadcast.address[x] = if_addr->address.in_addr.s4_addr[x] |
|
||||
~iface->config.ip.ipv4->netmask.s4_addr[x];
|
||||
}
|
||||
|
||||
bip_set_addr(&unicast);
|
||||
bip_set_broadcast_addr(&broadcast);
|
||||
|
||||
/* net_if -> net_if_config . net_if_ip . net_if_ipv4 -> net_if_addr . net_addr . in_addr . s4_addr[4] */
|
||||
LOG_INF(" Unicast: %s", log_strdup(inet_ntoa(&interface->config.ip.ipv4->unicast->address.in_addr)));
|
||||
LOG_INF(" Broadcast: %s", log_strdup(inet_ntoa(&BIP_Broadcast_Addr)));
|
||||
LOG_INF(" Netmask: %s", log_strdup(inet_ntoa(&interface->config.ip.ipv4->netmask)) );
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERR("%s:%d - Failed to set interface", THIS_FILE, __LINE__);
|
||||
LOG_INF("BACnet/IP Unicast: %u.%u.%u.%u", unicast.address[0],
|
||||
unicast.address[1], unicast.address[2], unicast.address[3]);
|
||||
LOG_INF("BACnet/IP Broadcast: %u.%u.%u.%u", broadcast.address[0],
|
||||
broadcast.address[1], broadcast.address[2], broadcast.address[3]);
|
||||
} else {
|
||||
LOG_ERR("%s:%d - Failed to set iface", THIS_FILE, __LINE__);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,9 +527,7 @@ static int createSocket(struct sockaddr_in *sin)
|
||||
if (sock_fd < 0) {
|
||||
LOG_ERR("%s:%d - Failed to create socket", THIS_FILE, __LINE__);
|
||||
return sock_fd;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
LOG_DBG("Socket created");
|
||||
}
|
||||
|
||||
@@ -537,15 +541,13 @@ static int createSocket(struct sockaddr_in *sin)
|
||||
}
|
||||
|
||||
/* bind the socket to the local port number and IP address */
|
||||
status =
|
||||
zsock_bind(sock_fd, (const struct sockaddr *)sin, sizeof(struct sockaddr));
|
||||
status = zsock_bind(
|
||||
sock_fd, (const struct sockaddr *)sin, sizeof(struct sockaddr));
|
||||
if (status < 0) {
|
||||
zsock_close(sock_fd);
|
||||
LOG_ERR("%s:%d - zsock_bind() failure", THIS_FILE, __LINE__);
|
||||
return status;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
LOG_DBG("Socket bound");
|
||||
}
|
||||
|
||||
@@ -577,7 +579,8 @@ bool bip_init(char *ifname)
|
||||
bip_set_interface(ifname);
|
||||
|
||||
if (BIP_Address.s_addr == 0) {
|
||||
LOG_ERR("%s:%d - Failed to get an IP address on interface: %s\n", THIS_FILE, __LINE__, log_strdup(ifname ? ifname : "[default]"));
|
||||
LOG_ERR("%s:%d - Failed to get an IP address on interface: %s\n",
|
||||
THIS_FILE, __LINE__, ifname ? ifname : "[default]");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,14 +12,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#if CONFIG_NATIVE_APPLICATION
|
||||
#include <sys/time.h>
|
||||
#elif defined(__ZEPHYR__)
|
||||
#include <zephyr/posix/sys/time.h>
|
||||
#else
|
||||
#include <posix/sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include "bacnet/datetime.h"
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+11
-24
@@ -1,27 +1,14 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (C) 2004 Steve Karg <skarg@users.sourceforge.net>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*********************************************************************/
|
||||
/**
|
||||
* @file
|
||||
* @brief Default configuration for BACnet Stack library
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2004
|
||||
* @section LICENSE
|
||||
*
|
||||
* Copyright (C) 2004 Steve Karg <skarg@users.sourceforge.net>
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
|
||||
+37
-39
@@ -332,43 +332,43 @@ set(BACNETSTACK_BASIC_SRCS
|
||||
$<$<BOOL:${CONFIG_BACDL_BIP6}>:${BACNETSTACK_SRC}/bacnet/basic/bbmd6/h_bbmd6.c>
|
||||
$<$<BOOL:${CONFIG_BACDL_BIP6}>:${BACNETSTACK_SRC}/bacnet/basic/bbmd6/vmac.c>
|
||||
${BACNETSTACK_SRC}/bacnet/basic/npdu/s_router.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/access_credential.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/access_door.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/access_point.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/access_rights.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/access_user.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/access_zone.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/acc.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/ao.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/bacfile.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/bi.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/bo.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/bv.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/calendar.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/channel.c
|
||||
#${BACNETSTACK_SRC}/bacnet/basic/object/client/device-client.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/command.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/color_object.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/color_temperature.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/credential_data_input.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/csv.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/device.c
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS_ACCESS}>:${BACNETSTACK_SRC}/bacnet/basic/object/access_credential.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS_ACCESS}>:${BACNETSTACK_SRC}/bacnet/basic/object/access_door.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS_ACCESS}>:${BACNETSTACK_SRC}/bacnet/basic/object/access_point.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS_ACCESS}>:${BACNETSTACK_SRC}/bacnet/basic/object/access_rights.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS_ACCESS}>:${BACNETSTACK_SRC}/bacnet/basic/object/access_user.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS_ACCESS}>:${BACNETSTACK_SRC}/bacnet/basic/object/access_zone.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_ACCUMULATOR}>:${BACNETSTACK_SRC}/bacnet/basic/object/acc.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_ANALOG_OUTPUT}>:${BACNETSTACK_SRC}/bacnet/basic/object/ao.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_FILE}>:${BACNETSTACK_SRC}/bacnet/basic/object/bacfile.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_BINARY_INPUT}>:${BACNETSTACK_SRC}/bacnet/basic/object/bi.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_BINARY_OUTPUT}>:${BACNETSTACK_SRC}/bacnet/basic/object/bo.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_BINARY_VALUE}>:${BACNETSTACK_SRC}/bacnet/basic/object/bv.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_CALENDAR}>:${BACNETSTACK_SRC}/bacnet/basic/object/calendar.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_CHANNEL}>:${BACNETSTACK_SRC}/bacnet/basic/object/channel.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_COMMAND}>:${BACNETSTACK_SRC}/bacnet/basic/object/command.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_COLOR}>:${BACNETSTACK_SRC}/bacnet/basic/object/color_object.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_COLOR_TEMPERATURE}>:${BACNETSTACK_SRC}/bacnet/basic/object/color_temperature.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS_ACCESS}>:${BACNETSTACK_SRC}/bacnet/basic/object/credential_data_input.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_CHARACTERSTRING_VALUE}>:${BACNETSTACK_SRC}/bacnet/basic/object/csv.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_DEVICE_CLIENT}>:${BACNETSTACK_SRC}/bacnet/basic/object/client/device-client.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_DEVICE_SERVER}>:${BACNETSTACK_SRC}/bacnet/basic/object/device.c>
|
||||
$<$<BOOL:${CONFIG_BAC_ROUTING}>:${BACNETSTACK_SRC}/bacnet/basic/object/gateway/gw_device.c>
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/iv.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/lc.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/lo.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/lsp.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/ms-input.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/mso.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/msv.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/nc.c
|
||||
$<$<BOOL:${CONFIG_BACDL_BIP}>:${BACNETSTACK_SRC}/bacnet/basic/object/netport.c>
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/objects.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/osv.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/piv.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/schedule.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/time_value.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/object/trendlog.c
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_INTEGER_VALUE}>:${BACNETSTACK_SRC}/bacnet/basic/object/iv.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_LOAD_CONTROL}>:${BACNETSTACK_SRC}/bacnet/basic/object/lc.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_LIGHTING_OUTPUT}>:${BACNETSTACK_SRC}/bacnet/basic/object/lo.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_LIFE_SAFETY_POINT}>:${BACNETSTACK_SRC}/bacnet/basic/object/lsp.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_MULTISTATE_INPUT}>:${BACNETSTACK_SRC}/bacnet/basic/object/ms-input.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_MULTISTATE_OUTPUT}>:${BACNETSTACK_SRC}/bacnet/basic/object/mso.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_MULTISTATE_VALUE}>:${BACNETSTACK_SRC}/bacnet/basic/object/msv.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_NOTIFICATION_CLASS}>:${BACNETSTACK_SRC}/bacnet/basic/object/nc.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_NETWORK_PORT}>:${BACNETSTACK_SRC}/bacnet/basic/object/netport.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS}>:${BACNETSTACK_SRC}/bacnet/basic/object/objects.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_OCTET_STRING_VALUE}>:${BACNETSTACK_SRC}/bacnet/basic/object/osv.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_POSITIVE_INTEGER_VALUE}>:${BACNETSTACK_SRC}/bacnet/basic/object/piv.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_SCHEDULE}>:${BACNETSTACK_SRC}/bacnet/basic/object/schedule.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_TIME_VALUE}>:${BACNETSTACK_SRC}/bacnet/basic/object/time_value.c>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECT_TRENDLOG}>:${BACNETSTACK_SRC}/bacnet/basic/object/trendlog.c>
|
||||
${BACNETSTACK_SRC}/bacnet/basic/service/h_alarm_ack.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/service/h_arf_a.c
|
||||
${BACNETSTACK_SRC}/bacnet/basic/service/h_arf.c
|
||||
@@ -428,9 +428,6 @@ list(
|
||||
$<$<BOOL:${CONFIG_BACDL_ETHERNET}>:${BACNETSTACK_PORT}/ethernet.c>
|
||||
${BACNETSTACK_PORT}/main.c
|
||||
${BACNETSTACK_PORT}/mstimer-init.c
|
||||
${BACNETSTACK_PORT}/ai.c
|
||||
${BACNETSTACK_PORT}/av.c
|
||||
${BACNETSTACK_PORT}/event.c
|
||||
)
|
||||
|
||||
|
||||
@@ -450,6 +447,7 @@ zephyr_library_compile_definitions(
|
||||
$<$<BOOL:${CONFIG_BACDL_MSTP}>:BACDL_MSTP>
|
||||
$<$<BOOL:${CONFIG_BACDL_ETHERNET}>:BACDL_ETHERNET>
|
||||
$<$<BOOL:${CONFIG_BACDL_NONE}>:BACDL_NONE>
|
||||
$<$<BOOL:${CONFIG_BACNET_BASIC_OBJECTS}>:BACNET_BASIC_OBJECTS>
|
||||
$<$<BOOL:${CONFIG_BACNET_PROPERTY_LISTS}>:BACNET_PROPERTY_LISTS=1>
|
||||
$<$<BOOL:${CONFIG_BACNET_ROUTING}>:BACNET_ROUTING>
|
||||
$<$<BOOL:${CONFIG_BACAPP_PRINT_ENABLED}>:BACAPP_PRINT_ENABLED=1>
|
||||
|
||||
+186
@@ -112,6 +112,192 @@ config BACNET_USE_SECTION_ITERABLE_OBJECT_TABLE
|
||||
help
|
||||
Use the Section Iterable for the Object Table
|
||||
|
||||
config BACNET_BASIC_OBJECTS_ACCESS
|
||||
bool "Use the BACnet basic access control objects"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic access control objects
|
||||
|
||||
config BACNET_BASIC_OBJECT_ACCUMULATOR
|
||||
bool "Use the BACnet basic accumulator object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic accumulator object
|
||||
|
||||
config BACNET_BASIC_OBJECT_ANALOG_INPUT
|
||||
bool "Use the BACnet basic analog input object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic analog input object
|
||||
|
||||
config BACNET_BASIC_OBJECT_ANALOG_OUTPUT
|
||||
bool "Use the BACnet basic analog output object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic analog output object
|
||||
|
||||
config BACNET_BASIC_OBJECT_ANALOG_VALUE
|
||||
bool "Use the BACnet basic analog value object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic analog value object
|
||||
|
||||
config BACNET_BASIC_OBJECT_FILE
|
||||
bool "Use the BACnet basic file object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic file object
|
||||
|
||||
config BACNET_BASIC_OBJECT_BINARY_INPUT
|
||||
bool "Use the BACnet basic binary input object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic binary input object
|
||||
|
||||
config BACNET_BASIC_OBJECT_BINARY_OUTPUT
|
||||
bool "Use the BACnet basic binary output object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic binary output object
|
||||
|
||||
config BACNET_BASIC_OBJECT_BINARY_VALUE
|
||||
bool "Use the BACnet basic binary value object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic binary value object
|
||||
|
||||
config BACNET_BASIC_OBJECT_CALENDAR
|
||||
bool "Use the BACnet basic calendar object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic calendar object
|
||||
|
||||
config BACNET_BASIC_OBJECT_CHANNEL
|
||||
bool "Use the BACnet basic channel object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic channel object
|
||||
|
||||
config BACNET_BASIC_OBJECT_COMMAND
|
||||
bool "Use the BACnet basic command object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic command object
|
||||
|
||||
config BACNET_BASIC_OBJECT_COLOR
|
||||
bool "Use the BACnet basic color object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic color object
|
||||
|
||||
config BACNET_BASIC_OBJECT_COLOR_TEMPERATURE
|
||||
bool "Use the BACnet basic color temperature object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic color temperature object
|
||||
|
||||
config BACNET_BASIC_OBJECT_CHARACTERSTRING_VALUE
|
||||
bool "Use the BACnet basic character-string value object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic character-string value object
|
||||
|
||||
config BACNET_BASIC_OBJECT_DEVICE_SERVER
|
||||
bool "Use the BACnet basic device-server object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic device-server object
|
||||
|
||||
config BACNET_BASIC_OBJECT_DEVICE_CLIENT
|
||||
bool "Use the BACnet basic device-client object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic device-server object
|
||||
|
||||
config BACNET_BASIC_OBJECT_INTEGER_VALUE
|
||||
bool "Use the BACnet basic integer value object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic integer value object
|
||||
|
||||
config BACNET_BASIC_OBJECT_LOAD_CONTROL
|
||||
bool "Use the BACnet basic load control object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic load control object
|
||||
|
||||
config BACNET_BASIC_OBJECT_LIGHTING_OUTPUT
|
||||
bool "Use the BACnet basic lighting output object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic lighting output object
|
||||
|
||||
config BACNET_BASIC_OBJECT_LIFE_SAFETY_POINT
|
||||
bool "Use the BACnet basic life-safety point object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic life-safety point object
|
||||
|
||||
config BACNET_BASIC_OBJECT_MULTISTATE_INPUT
|
||||
bool "Use the BACnet basic multistate input object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic multistate input object
|
||||
|
||||
config BACNET_BASIC_OBJECT_MULTISTATE_OUTPUT
|
||||
bool "Use the BACnet basic multistate output object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic multistate output object
|
||||
|
||||
config BACNET_BASIC_OBJECT_MULTISTATE_VALUE
|
||||
bool "Use the BACnet basic multistate value object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic multistate value object
|
||||
|
||||
config BACNET_BASIC_OBJECT_NOTIFICATION_CLASS
|
||||
bool "Use the BACnet basic notification class object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic notification class object
|
||||
|
||||
config BACNET_BASIC_OBJECT_NETWORK_PORT
|
||||
bool "Use the BACnet basic network port object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic network port object
|
||||
|
||||
config BACNET_BASIC_OBJECT_OCTET_STRING_VALUE
|
||||
bool "Use the BACnet basic octet-string value object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic octet-string value object
|
||||
|
||||
config BACNET_BASIC_OBJECT_POSITIVE_INTEGER_VALUE
|
||||
bool "Use the BACnet basic positive-integer value object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic positive-integer value object
|
||||
|
||||
config CONFIG_BACNET_BASIC_OBJECT_SCHEDULE
|
||||
bool "Use the BACnet basic schedule object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic schedule object
|
||||
|
||||
config CONFIG_BACNET_BASIC_OBJECT_TIME_VALUE
|
||||
bool "Use the BACnet basic time value object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic time value object
|
||||
|
||||
config CONFIG_BACNET_BASIC_OBJECT_TRENDLOG
|
||||
bool "Use the BACnet basic trendlog object"
|
||||
default false
|
||||
help
|
||||
Use the BACnet basic trendlog object
|
||||
|
||||
rsource "subsys/Kconfig"
|
||||
|
||||
endif # BACNETSTACK
|
||||
|
||||
Reference in New Issue
Block a user