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
857 stars 459 forks source link

Can you provide an example of initializing the client to enable the BufferReportControl ? #255

Open Mrcbj opened 4 years ago

Mrcbj commented 4 years ago

libiec61850:1.4.1 platform:18.04.1-Ubuntu I try to modify "iec61850_client_example_reporting.c",but failed. 1.IEC61850 Client Connect IEC61850 Server 2.rcb = IedConnection_getRCBValues 3.IedConnection_getDataSetDirectory

  1. tmp = ClientReportControlBlock_setResv(rcb, false); 5.ClientReportControlBlock_setTrgOps(rcb, TRG_OPT_DATA_CHANGED | TRG_OPT_INTEGRITY| TRG_OPT_GI); 6.ClientReportControlBlock_setIntgPd(rcb, 2000); 7.ClientReportControlBlock_setDataSetReference(rcb,dataSetDirectory_str) 8.ClientReportControlBlock_setRptEna(rcb, true); 9.ClientReportControlBlock_setGI(rcb, true); 10.IedConnection_installReportHandler 11.IedConnection_setRCBValues(con, &error, rcb,RCB_ELEMENT_DATSET | RCB_ELEMENT_TRG_OPS | RCB_ELEMENT_RPT_ENA , true);

I can see from the sniffer that the data has changed,but reportCallbackFunction No action. Thank you

mzillgith commented 4 years ago

Maybe it is because you don't send all the attributes that you want to be changed. E.g. you set GI but the GI is not in the list of elements to be sent when calling _IedConnectionsetRCBValues.