Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 67328

Should a simulated hardware device be a child or a sibling of the "real thing"?

$
0
0

I'm just now getting started using the Actor Framework and am coming up with some "architectural" questions I hadn't really considered beforehand. Part of my code involves using various hardware devices, which need a custom simulation option- for example, a popup where a user can manually enter the values for an analog input.

 

What I'm wondering now is what the best practice would be for simulated hardware from an LVOOP standpoint. My first go at this had a "Data reader" actor (what I believe is called the "hardware abstraction layer") which had two child actors, a DAQmx one and a Simulated one, where a window would let the user enter the values. This works well and is all fine and good, but when I started working on my second one I started thinking if I should do a Simulated DAQ as a child (override) of the specific DAQ that it's simulating. My gut tells me they should be siblings, but I couldn't find much information on this (searching "child sibling object hardware" just gets me a lot of Google results about toys, haha).

 

As I'm not the first person to need this I am assuming this is mainly a "solved problem" and would love to hear what the best design pattern is for creating simulated hardware devices.

 

Any tips?


Viewing all articles
Browse latest Browse all 67328


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>