Design consulting
Hi all,
I have the following design conflict :
I have to write an application that reads and writes values to hardware device.
I have two filed devices maybe more in the future (D1,D2,...)
Each device has it's way for making communication.
I thought to make the design as following :
1. Build IDevice interface
2. Build D1 class and D2 class that implement IDevice.
3. Build Tag class that maintain the value of certain adress in the devices.
4. Build a serial port class that implements the communication with the COM ports.
I want to build a container of Tag class witch may relate to D1 class or D2 class.
I don't know how to connect between the Tag class and the D1,D2. I thought to put a reference to D1 in Tag but maybe the Tag related to D2 so I need also instance to D2.
What is the correct way to do that.
Thanks in advance.
Regards...

