Skip to content

concore.hpp / concoredocker.hpp read() has no status, can't distinguish real data from silent default fallback #498

@avinxshKD

Description

@avinxshKD

Python has read_status (SUCCESS, TIMEOUT, PARSE_ERROR, FILE_NOT_FOUND, RETRIES_EXCEEDED). Java has the full ReadStatus enum and ReadResult wrapper. C++ returns a bare vector with no indication of what happened.

If the file doesn't exist, parse fails, or retries exhaust, you still get back whatever initval was. No way to know. In a control loop that matters, because acting on stale default data vs real sensor data are very different things.

Also noticed load_params() in concore_base.hpp has a related bug, it does regex substitution targeting commas, but the actual format generated by mkconcore.py is semicolon-separated (a=1;b=2). Python and Java split on ; then = correctly. C++ doesn't, so params silently come back empty.

Expected: C++ API should match Python/Java .... struct/enum that lets callers check whether the read actually succeeded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions