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

How to handle select-before-execute in a server? #17

Closed
gboor opened this issue Nov 11, 2020 · 2 comments
Closed

How to handle select-before-execute in a server? #17

gboor opened this issue Nov 11, 2020 · 2 comments
Labels

Comments

@gboor
Copy link

gboor commented Nov 11, 2020

As the title says; I'm just wondering if there is some sort of default stub for this that handles timeout etc., or if this is something that needs to be created from scratch.

I'm using the C# lib. If anyone has some examples of how to do this, that would be helpful too!

I previously posted this here; mz-automation/libiec61850#278, but realized I had the wrong repo!

@mzillgith
Copy link
Contributor

Your application has to handle this by checking the state of the select/execute flag.

This can be done by code like below in the AsduHandler callback:

SingleCommand sc = (SingleCommand)asdu.GetElement (0);

if (sc.Select)
{
    //select
}
else
{
    //execute
}

@gboor
Copy link
Author

gboor commented Nov 28, 2020

Thanks! I see this also made it into the example. I will close this ticket.

@gboor gboor closed this as completed Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants