In the current design, the class GenericIOLDevice implements the Application Layer (according to the IO-Link Interface and System Specification) beside other things. Each class that implements / abstracts a specific device (e.g. BNI0088 implements a SmartLight from Balluff GmbH) inherits from GenericIOLDevice. Because these Device classes are the interface between the master stack and the user application, all public methods of GenericIOLDevice are exposed to the user application, which is not necessarily desirable.
Declaring the methods of GenericIOLDeviceprotected (such that only inheriting objects can access them) is not possibe, because the user needs to instantiate and use GenericIOLDevice directly, if his/her Device is not implemented (i.e. no Device class is available for it (yet)).
However, the Device classes could inherit protected (instead of public, which is the default) from GenericIOLDevice
An other idea would be to add an additional layer over the "Application Layer". This layer would consist of the Device classes which would use "the Application Layer" but hide it from the user.
In the current design, the class
GenericIOLDevice
implements the Application Layer (according to the IO-Link Interface and System Specification) beside other things. Each class that implements / abstracts a specific device (e.g.BNI0088
implements a SmartLight from Balluff GmbH) inherits fromGenericIOLDevice
. Because these Device classes are the interface between the master stack and the user application, all public methods ofGenericIOLDevice
are exposed to the user application, which is not necessarily desirable.GenericIOLDevice
protected
(such that only inheriting objects can access them) is not possibe, because the user needs to instantiate and useGenericIOLDevice
directly, if his/her Device is not implemented (i.e. no Device class is available for it (yet)).protected
(instead ofpublic
, which is the default) fromGenericIOLDevice