bacnet协议栈源代码


移植在stm32上的bacnet源代码,便于开发者学习,代码完整。
资源截图
代码片段和文件信息
/**************************************************************************
*
* Copyright (C) 2006 Steve Karg 
*
* 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.
*
*********************************************************************/

/* command line tool demo for BACnet stack */
#include 
#include 
#include 
#include 
#include        /* for time */
#include 
#include “bactext.h“
#include “iam.h“
#include “arf.h“
#include “tsm.h“
#include “address.h“
#include “config.h“
#include “bacdef.h“
#include “npdu.h“
#include “apdu.h“
#include “device.h“
#include “net.h“
#include “datalink.h“
#include “whois.h“
#include “dcc.h“
/* some demo stuff needed */
#include “filename.h“
#include “handlers.h“
#include “client.h“
#include “txbuf.h“
#include “dlenv.h“

/* buffer used for receive */
static uint8_t Rx_Buf[MAX_MPDU] = { 0 };

/* global variables used in this file */
static uint32_t Target_Device_object_Instance = BACNET_MAX_INSTANCE;
static BACNET_ADDRESS Target_Address;
static uint16_t Communication_Timeout_Minutes = 0;
static BACNET_COMMUNICATION_ENABLE_DISABLE Communication_State =
    COMMUNICATION_ENABLE;
static char *Communication_Password = NULL;

static bool Error_Detected = false;

static void MyErrorHandler(
    BACNET_ADDRESS * src
    uint8_t invoke_id
    BACNET_ERROR_CLASS error_class
    BACNET_ERROR_CODE error_code)
{
    /* FIXME: verify src and invoke id */
    (void) src;
    (void) invoke_id;
    printf(“BACnet Error: %s: %s
“ bactext_error_class_name(error_class)
        bactext_error_code_name(error_code));
    Error_Detected = true;
}

void MyAbortHandler(
    BACNET_ADDRESS * src
    uint8_t invoke_id
    uint8_t abort_reason
    bool server)
{
    /* FIXME: verify src and invoke id */
    (void) src;
    (void) invoke_id;
    (void) server;
    printf(“BACne

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-11-19 05:38  bacnet-stack-0.8.5
     文件         507  2013-03-22 01:02  bacnet-stack-0.8.5export.sh
     目录           0  2017-11-19 05:38  bacnet-stack-0.8.5lib
     文件        5880  2013-10-09 21:52  bacnet-stack-0.8.5libmakefile.b32
     文件         775  2010-02-14 05:53  bacnet-stack-0.8.5libmain.cpp
     文件       13140  2012-04-16 14:59  bacnet-stack-0.8.5libacnet.cbp
     文件        8313  2012-04-06 23:24  bacnet-stack-0.8.5libacnetdll.cbp
     文件         466  2012-04-06 23:24  bacnet-stack-0.8.5libmain.h
     文件        5344  2017-01-02 23:08  bacnet-stack-0.8.5libMakefile
     文件        5149  2012-04-06 23:24  bacnet-stack-0.8.5
eadme.txt
     目录           0  2017-11-19 05:38  bacnet-stack-0.8.5 est
     文件        1616  2012-04-06 23:24  bacnet-stack-0.8.5 est
d.cbp
     文件         614  2012-04-06 23:24  bacnet-stack-0.8.5 estwhois.mak
     文件         510  2012-04-06 23:24  bacnet-stack-0.8.5 estindtext.mak
     文件         825  2016-03-10 18:03  bacnet-stack-0.8.5 est
pm.mak
     文件       32336  2007-10-26 19:58  bacnet-stack-0.8.5 estacdcode.ide
     文件         773  2016-03-10 18:03  bacnet-stack-0.8.5 estcov.mak
     文件         616  2012-04-06 23:24  bacnet-stack-0.8.5 est
p.mak
     文件        1476  2012-04-06 23:24  bacnet-stack-0.8.5 estaddress.cbp
     文件       29721  2007-10-26 19:58  bacnet-stack-0.8.5 estcrc.ide
     文件         525  2012-04-06 23:24  bacnet-stack-0.8.5 estsbuf.mak
     文件         528  2012-04-06 23:24  bacnet-stack-0.8.5 estfilename.mak
     文件         622  2012-04-06 23:24  bacnet-stack-0.8.5 est
d.mak
     文件        1667  2012-04-06 23:24  bacnet-stack-0.8.5 estctest.h
     文件        3290  2012-04-06 23:24  bacnet-stack-0.8.5 est imesync.cbp
     文件         568  2012-04-06 23:24  bacnet-stack-0.8.5 estobjects.mak
     文件         614  2012-04-06 23:24  bacnet-stack-0.8.5 estwhohas.mak
     文件         594  2012-04-06 23:24  bacnet-stack-0.8.5 estabort.mak
     文件        3952  2012-04-06 23:24  bacnet-stack-0.8.5 estctest.c
     文件         798  2016-09-28 18:42  bacnet-stack-0.8.5 estbmd6.mak
     文件         630  2012-04-06 23:24  bacnet-stack-0.8.5 estawf.mak
............此处省略1061个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)