Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Report Handler in Python #500

Open
plipK opened this issue Mar 21, 2024 · 1 comment
Open

Client Report Handler in Python #500

plipK opened this issue Mar 21, 2024 · 1 comment

Comments

@plipK
Copy link

plipK commented Mar 21, 2024

Hi,

I am trying to set up some python test code based on the client reporting example. I can connect to my IED and read dataset and RCB. But when I try to install a Report handler I get a TypeError Exeption for the reportHandler argument in the IedConnection_installReportHandler call. Does anyone know what the reason is?

Here is my code:

import iec61850

def reportHandler(params, report):
    print("Report Callback")

connection = iec61850.IedConnection_create()
iec61850.IedConnection_connect(connection, "192.168.178.10", 102)
[dataSetDirectory, rdErr] = iec61850.IedConnection_getDataSetDirectory(connection, "Server_CP2TestDevice/LLN0.RCB_DataSet", None)
[clientDataSet, rdErr] = iec61850.IedConnection_readDataSetValues(connection, "Server_CP2TestDevice/LLN0.RCB_DataSet", None)
[rcb, rdErr]  = iec61850.IedConnection_getRCBValues(connection, "Server_CP2TestDevice/LLN0.RP.UnbufferedRCB01", None)
iec61850.IedConnection_installReportHandler(connection, "Server_CP2TestDevice/LLN0.RP.UnbufferedRCB", 
                                            iec61850.ClientReportControlBlock_getRptId(rcb), reportHandler, dataSetDirectory)
@nikunj1222
Copy link

Hi @plipK ,

Please check the example for Python report subcription https://github.com/mz-automation/libiec61850/blob/v1.5/pyiec61850/examples/rcbSubscriptionExample.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants