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

Question: Getting single attribute #102

Open
TinFoilHatFrog opened this issue Jul 20, 2021 · 0 comments
Open

Question: Getting single attribute #102

TinFoilHatFrog opened this issue Jul 20, 2021 · 0 comments

Comments

@TinFoilHatFrog
Copy link

TinFoilHatFrog commented Jul 20, 2021

Im trying to create a script that queries attributes on different objects.
The following works, but it requires data type:
proxy_simple(ip).read([ (f"@1/1/1", "UINT")])

However some attributes are marked as "Array of bytes" etc which dont seem to have data type associated to them in CPPPO. Leaving out the data type always returns "NONE".

Im able to get the correct output with the following command but i have no clue how to do this in script:
python -m cpppo.server.enip.get_attribute @1/1/5 -a 10.0.0.9 -S

So my question is how to get the output what python -m cpppo.server.enip.get_attribute @1/1/5 -a 10.0.0.9 -S returns but through library functions. I only need to get the raw data. Ive tried looking through the docs but i havent found a solution.

I tried copy pasting relevant parts of get_attribute.py to no avail.

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

1 participant