Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Provider Naming Consistency #520

@stefanhaustein

Description

@stefanhaustein

Looking at various providers, they all seem to start with the "group(?)" name, followed by the kind of IO.

From the context instructions:

Context pi4j = Pi4J.newContextBuilder()
   .add(new MockPlatform())
   .add(MockAnalogInputProvider.newInstance(),
      MockAnalogOutputProvider.newInstance(),
      MockSpiProvider.newInstance(),
      MockPwmProvider.newInstance(),
      MockSerialProvider.newInstance(),
      MockI2CProvider.newInstance(),
      MockDigitalInputProvider.newInstance(),
      MockDigitalOutputProvider.newInstance())

All other providers seem to follow this XyzProvider.newInstance() pattern.

In contrast, the FFM providers seems to be following a different naming pattern (SpiFFMProviderIntsance). The "Provider" interfaces (providing the newInstance) seem to be absent.

Wouldn't it make sense to be consistent here?

Probably also with pre-existing naming conventions (SPI -> Spi, PWM -> Pwm, ... => FFM -> Ffm)

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