Skip to content

OneWire sensor - override SysfsBusDevicesPath #2477

@florianraffl

Description

@florianraffl

Is your feature request related to a problem? Please describe.
I'm trying to implement OneWire Temperature sensor on my RaspberryPi. Everything works great! But, to create a well tested software, I also wanted to create integration tests. So it would be nice to somehow override the hardcoded const SysfsBusDevicesPath just for testing, to target to a local placed fake temperature sensor files.

Describe the ideal solution
The ideal solution in my opinion would be to create some "setter-methods" to override the hardcoded const SysfsBusDevicesPath:
https://github.com/dotnet/iot/blob/77d4d79c8332c3659c5666a62b3e1af57b3867c0/src/devices/OneWire/OneWireBus.Linux.cs#L15C31-L15C50

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:3Work that is nice to haveapi-suggestionEarly API idea and discussion, it is NOT ready for implementation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions