mz-automation / libiec61850

Official repository for libIEC61850, the open-source library for the IEC 61850 protocols
http://libiec61850.com/libiec61850
GNU General Public License v3.0
828 stars 444 forks source link

fetch dynamic model error under array node #468

Closed xiezhaokai closed 11 months ago

xiezhaokai commented 11 months ago

Here I have an ied model shown as below (by IEDScout)

array-example Under node "PQPQLD1/MHAI4.HRPhV.phsAHar" is an array. But When I use IedConnection_getDataDirectoryByFC to walk throught the data model the same way as example code "iec61850_client_example2" shows. The recursive function ends at the node unexpectedly. The breakpoint in debug mode shows that the returned LinkedList has a "null next " .

code

null_next

Am I used the wrong API to walk throught deeply under a array node? The version I used is "1.5.1".

chenjing1294 commented 1 month ago

@xiezhaokai Hi, how do you solve this problem? Even if you use "testComplexArray/MHAI1.HA.phsAHar(0)" I still can't get DataAttribute

xiezhaokai commented 1 month ago

A workaround way I used but may not efficient enough is fetching MmsVariableSpecification of the node recursively through MmsVariableSpecification_getChildSpecificationByIndex