Volttron,不支持 BACnet 设备的分段

问题描述

你好,

希望你做得很好。

我正在从 AHU 读取数据,但在获取对象列表时出现错误: 分段不支持。 在发送 WhoIsIAm (bacnet_scan.py) 时,我收到以下回复

Device Address        = <RemoteStation 4100:9>
Device Id             = 409
maxAPDULengthAccepted = 206
segmentationSupported = noSegmentation
vendorID              = 17

我的客户端应用程序 (grab_bacnet_config.py) 的配置是:

[BAcpypes]
objectName: Betelgeuse
address: myIP/24
objectIdentifier: 599
maxApduLengthAccepted: 206 
segmentationSupported: segmentedBoth
vendorIdentifier: 15

我将 maxApduLengthAccepted 更改为远程设备的 maxApduLengthAccepted。还试图使其足够大以供其他设备使用。阅读其他问题,尝试使用 bacpypes github repo 提供的 ReadProperty 进行调试。

python read.py --debug bacpypes.appservice.ClientSSM
DEBUG:bacpypes.consolelogging.ConfigArgumentParser:__init__
DEBUG:bacpypes.consolelogging.ArgumentParser:__init__
DEBUG:bacpypes.consolelogging.ConfigArgumentParser:update_os_env
DEBUG:bacpypes.consolelogging.ArgumentParser:update_os_env
DEBUG:bacpypes.consolelogging.ArgumentParser:    - settings: {'debug_file': '','debug': set([]),'max_bytes': 1048576,'color': False,'backup_count': 5,'route_aware': False}
DEBUG:bacpypes.consolelogging.ArgumentParser:    - os environment
DEBUG:bacpypes.consolelogging.ArgumentParser:parse_args
DEBUG:bacpypes.consolelogging.ConfigArgumentParser:expand_args Namespace(buggers=False,color=None,debug=['bacpypes.appservice.ClientSSM'],ini='BAcpypes.ini',route_aware=None)
DEBUG:bacpypes.consolelogging:    - config: <ConfigParser.ConfigParser instance at 0x7fa5066dc0>
DEBUG:bacpypes.consolelogging:    - ini_obj: {'objectidentifier': '599','segmentationsupported': 'segmentedReceive','objectname': 'Betelgeuse','address': 'myIP/24','vendoridentifier': '15','maxapdulengthaccepted': '206'}
DEBUG:bacpypes.consolelogging.ArgumentParser:expand_args Namespace(buggers=False,ini={'objectidentifier': '599','maxapdulengthaccepted': '206'},route_aware=None)
DEBUG:bacpypes.consolelogging.ArgumentParser:    - debug: ['bacpypes.appservice.ClientSSM']
DEBUG:bacpypes.consolelogging.ArgumentParser:    - color not specified
DEBUG:bacpypes.consolelogging.ArgumentParser:    - route_aware not specified
DEBUG:bacpypes.consolelogging.ArgumentParser:    - args expanded
DEBUG:bacpypes.consolelogging.ArgumentParser:interpret_debugging Namespace(buggers=False,route_aware=None)
DEBUG:bacpypes.consolelogging.ArgumentParser:    - settings: {'debug_file': '','debug': set(['bacpypes.appservice.ClientSSM']),'ini': 'BAcpypes.ini','route_aware': False}
DEBUG:bacpypes.consolelogging.ArgumentParser:    - interpreted debugging
> read 4100:9 device:409 objectList 
DEBUG:bacpypes.appservice.ClientSSM:__init__ <bacpypes.appservice.StateMachineAccesspoint object at 0x7fa50736d0> <Address 4100:9>
DEBUG:bacpypes.appservice.ClientSSM:indication <bacpypes.apdu.ConfirmedRequestPDU(12,1) instance at 0x7fa5073ed0>
    <bacpypes.apdu.ConfirmedRequestPDU(12,1) instance at 0x7fa5073ed0>
        pduDestination = <Address 4100:9>
        pduExpectingReply = 1
        pduNetworkPriority = 0
        apduType = 0
        apduService = 12
        apduInvokeID = 1
        pduData = x'0c.02.00.10.71.19.4c'
DEBUG:bacpypes.appservice.ClientSSM:    - segment size: 206
DEBUG:bacpypes.appservice.ClientSSM:    - invoke ID: 1
DEBUG:bacpypes.appservice.ClientSSM:    - segment count: 1
DEBUG:bacpypes.appservice.ClientSSM:set_state 2 (AWAIT_CONFIRMATION) timer=3000
DEBUG:bacpypes.appservice.ClientSSM:request <bacpypes.apdu.ConfirmedRequestPDU(12,1) instance at 0x7fa50733d0>
    <bacpypes.apdu.ConfirmedRequestPDU(12,1) instance at 0x7fa50733d0>
        pduDestination = <Address 4100:9>
        pduExpectingReply = 1
        pduNetworkPriority = 0
        apduType = 0
        apduSeg = False
        apduMor = False
        apduSA = True
        apduMaxSegs = 4
        apduMaxResp = 2
        apduService = 12
        apduInvokeID = 1
        pduData = x'0c.02.00.10.71.19.4c'
DEBUG:bacpypes.appservice.ClientSSM:confirmation <bacpypes.apdu.AbortPDU(None,1) instance at 0x7fa51ab650>
    <bacpypes.apdu.AbortPDU(None,1) instance at 0x7fa51ab650>
        pduSource = <RemoteStation 4100:9>
        pduDestination = <Address myIP>
        pduExpectingReply = False
        pduNetworkPriority = 0
        apduType = 7
        apduSrv = True
        apduInvokeID = 1
        apduAbortRejectReason = 4
        pduData = x''
DEBUG:bacpypes.appservice.ClientSSM:await_confirmation <bacpypes.apdu.AbortPDU(None,1) instance at 0x7fa51ab650>
        pduSource = <RemoteStation 4100:9>
        pduDestination = <Address myIP>
        pduExpectingReply = False
        pduNetworkPriority = 0
        apduType = 7
        apduSrv = True
        apduInvokeID = 1
        apduAbortRejectReason = 4
        pduData = x''
DEBUG:bacpypes.appservice.ClientSSM:    - server aborted
DEBUG:bacpypes.appservice.ClientSSM:set_state 7 (ABORTED) timer=0
DEBUG:bacpypes.appservice.ClientSSM:    - remove from active transactions
DEBUG:bacpypes.appservice.ClientSSM:response <bacpypes.apdu.AbortPDU(None,1) instance at 0x7fa51ab650>
        pduSource = <RemoteStation 4100:9>
        pduDestination = <Address myIP>
        pduExpectingReply = False
        pduNetworkPriority = 0
        apduType = 7
        apduSrv = True
        apduInvokeID = 1
        apduAbortRejectReason = 4
        pduData = x''
segmentationNotSupported

也尝试使APDU长度足够大并且等于远程设备的长度,但仍然无法读取objectList。我能够读取单个属性及其值,但不能读取对象的整体列表。我可以读吗? 我需要将它们放在 @volttron 中用于 grab_bacnet_config.py 脚本。有没有办法调整 apdu 长度或分段内容

问候, 穆罕德·阿纳斯·拉扎

解决方法

仅仅因为您的客户端可以(据说)支持“双向”方向的分段 - 发送和接收,服务器/设备/AHU 不支持。

因此,为了读取完整的对象列表,您必须回退到遍历对象列表数组 - 一次一个元素。

数组的元素/数组-索引0(-第一个元素),包含数据元素个数的计数;对于您想要读取的每个元素 - 包括第一个/元素,您必须指定您想要读取的目标/所需元素/索引。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...