Skip to content

Question: Getting single attribute #102

@TinFoilHatFrog

Description

@TinFoilHatFrog

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions