• 大小: 2.01MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-26
  • 语言: C#
  • 标签: Bacnet  c#  

资源简介

C#开发的BacNet应用程序,研究BacNet协议的开源工具,这是完整源码,自己编译使用

资源截图

代码片段和文件信息

/**************************************************************************
*                           MIT License

* Copyright (C) 2014 Morten Kvistgaard 
* Copyright (C) 2015 Frederic Chaxel 
*
* 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.
*
*********************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.BACnet;
using System.Reflection;
using BaCSharp;

namespace AnotherStorageImplementation
{
    static class BacnetActivity
    {
        static BacnetClient bacnet_client;
        static uint deviceId;
        static Deviceobject device;

        public static void StartActivity(Deviceobject _device)
        {
            deviceId=_device.PROP_object_IDENTIFIER.instance;
            device=_device;

            // Bacnet on UDP/IP/Ethernet
            bacnet_client = new BacnetClient(new BacnetIpUdpProtocolTransport(0xBAC0 false));

            bacnet_client.OnIam += new BacnetClient.IamHandler(handler_OnIam);
            bacnet_client.OnReadPropertyRequest += new BacnetClient.ReadPropertyRequestHandler(handler_OnReadPropertyRequest);
            bacnet_client.OnReadPropertyMultipleRequest += new BacnetClient.ReadPropertyMultipleRequestHandler(handler_OnReadPropertyMultipleRequest);
            bacnet_client.OnWritePropertyRequest += new BacnetClient.WritePropertyRequestHandler(handler_OnWritePropertyRequest);
            bacnet_client.OnSubscribeCOV += new BacnetClient.SubscribeCOVRequestHandler(handler_OnSubscribeCOV);
            bacnet_client.OnSubscribeCOVProperty += new BacnetClient.SubscribeCOVPropertyRequestHandler(handler_OnSubscribeCOVProperty);
            bacnet_client.OnReadRange += new BacnetClient.ReadRangeHandler(handler_OnReadRange);
            bacnet_client.OnAtomicWriteFileRequest += new BacnetClient.AtomicWriteFileRequestHandl

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-03-14 00:50  yetanotherbacnetexplorer-code-282-trunk\
     目录           0  2018-03-14 00:50  yetanotherbacnetexplorer-code-282-trunk\Yabe\
     文件        9363  2016-01-20 05:41  yetanotherbacnetexplorer-code-282-trunk\Yabe\SearchDialog.cs
     文件       10686  2014-01-28 11:02  yetanotherbacnetexplorer-code-282-trunk\Yabe\FileTransfers.cs
     文件        5817  2014-01-16 15:35  yetanotherbacnetexplorer-code-282-trunk\Yabe\SourceAddressDialog.resx
     目录           0  2018-03-14 00:50  yetanotherbacnetexplorer-code-282-trunk\Yabe\Properties\
     文件       12908  2017-03-16 15:16  yetanotherbacnetexplorer-code-282-trunk\Yabe\Properties\Resources.Designer.cs
     文件       17014  2018-01-22 05:37  yetanotherbacnetexplorer-code-282-trunk\Yabe\Properties\Settings.Designer.cs
     文件       12403  2017-03-16 15:16  yetanotherbacnetexplorer-code-282-trunk\Yabe\Properties\Resources.resx
     文件        1420  2018-02-08 04:23  yetanotherbacnetexplorer-code-282-trunk\Yabe\Properties\AssemblyInfo.cs
     文件        4986  2018-01-22 05:37  yetanotherbacnetexplorer-code-282-trunk\Yabe\Properties\Settings.settings
     文件       15648  2015-06-10 07:41  yetanotherbacnetexplorer-code-282-trunk\Yabe\TrendLogDisplay.cs
     文件       34453  2015-12-15 06:10  yetanotherbacnetexplorer-code-282-trunk\Yabe\BACnetTransportIPv6.cs
     文件        4622  2018-01-22 05:37  yetanotherbacnetexplorer-code-282-trunk\Yabe\app.config
     文件        5200  2015-12-11 09:35  yetanotherbacnetexplorer-code-282-trunk\Yabe\ForeignRegistry.designer.cs
     文件       78698  2017-10-08 06:50  yetanotherbacnetexplorer-code-282-trunk\Yabe\BacnetTransportSerial.cs
     文件        5199  2014-01-17 13:17  yetanotherbacnetexplorer-code-282-trunk\Yabe\SourceAddressDialog.Designer.cs
     文件      363397  2018-02-11 06:06  yetanotherbacnetexplorer-code-282-trunk\Yabe\BACnetbase.cs
     文件       68979  2018-01-17 09:21  yetanotherbacnetexplorer-code-282-trunk\Yabe\MainDialog.Designer.cs
     文件         880  2015-11-21 15:55  yetanotherbacnetexplorer-code-282-trunk\Yabe\ReadSinglePropDescr.xml
     文件       30362  2015-12-10 05:22  yetanotherbacnetexplorer-code-282-trunk\Yabe\SearchDialog.Designer.cs
     文件        3184  2014-01-28 11:02  yetanotherbacnetexplorer-code-282-trunk\Yabe\ProgressDialog.cs
     文件        5817  2014-01-28 14:42  yetanotherbacnetexplorer-code-282-trunk\Yabe\DeviceCommunicationControlDialog.resx
     文件       57855  2014-01-16 15:35  yetanotherbacnetexplorer-code-282-trunk\Yabe\SearchDialog.resx
     文件       57855  2015-03-25 13:23  yetanotherbacnetexplorer-code-282-trunk\Yabe\TrendLogDisplay.resx
     文件        6390  2017-01-01 15:26  yetanotherbacnetexplorer-code-282-trunk\Yabe\GenericInputBox.cs
     文件       29060  2017-08-17 12:36  yetanotherbacnetexplorer-code-282-trunk\Yabe\ReadSinglePropDescrDefault.xml
     文件        2392  2017-03-12 04:49  yetanotherbacnetexplorer-code-282-trunk\Yabe\Createobject.cs
     文件        7212  2017-10-08 06:50  yetanotherbacnetexplorer-code-282-trunk\Yabe\BBMDEditor.cs
     文件        1967  2014-01-17 13:17  yetanotherbacnetexplorer-code-282-trunk\Yabe\SourceAddressDialog.cs
     文件       29730  2015-06-20 06:54  yetanotherbacnetexplorer-code-282-trunk\Yabe\NotificationEditor.cs
............此处省略299个文件信息

评论

共有 条评论