Hi all,
I just started learning Classes and I have doubt when converting my existing project to OOP based.
To read Digital Input from NI devices, normally I make a parallel loop that keep acquire the boolean array and shove it into an FGV, then use it wherever I need. I intended to translate it into something like this (just ignore the local variable :D)
1) (Aside from the Parent/Child selector) Is this okay, or it's not recommended? I read in another thread that FGV and OOP shouldn't be used together in one architecture for easier trace and debugging. Though personally I prefer option 2 to prevent clutter when using more devices. I put the global outside the class method just in case i want to use more than 1 device, but basically it's part of the class that should be configured be used when someone using this class.
2) Since DVR doesn't work with dynamic dispatch, is there any way to work around it? Let's say I want to change the hardware from NI to something that use Modbus, which of course have different initialization and read method.
I want to make sure I get the basic right before continuing. Any input is appreciated and thanks!