Thang Nguyen Posted February 28, 2007 Report Share Posted February 28, 2007 Hi all, My project is working with different device with different type of communication. Each device has different speed of acquiring data base on type of connection. I have already created a class DataIO with different child class correspondent with each kind of device because each device has different read VI. Now I make another class called Pooller which in its process VI will call the Read VI in the DataIO class and pass it into an array. The problem is because I have different speed for different device, I want to have different process run simultaneously to read data from each device. I try to create multiple instances on the same class and assign different type of device for each instance, but it's not work. I did like this because I still think it like object oriented programming in C. My question is can we create multiple instances on one class? Or we have to create different child class for each instance. Thank you in advance for your time reading and answering this topic. Thang Nguyen Quote Link to comment
Tomi Maila Posted February 28, 2007 Report Share Posted February 28, 2007 QUOTE(Thang Nguyen @ Feb 27 2007, 11:34 PM) My question is can we create multiple instances on one class? Or we have to create different child class for each instance. In LabVOOP you create a new instance of a class by forking the wire. Two wires means two instances. LVOOP wires act in exactly the same way as clusters with the exception that the private data is hidden and only visible to class methods. When you fork a cluster wire, you get two clusrers, right? Then you can edit the content of one cluster and you have two instances of the same cluster type. Classes work the same way. If your data in a cluster is a reference, then forking the wire doesn't really make a new instance unless you change the refenrece in one of the wires. Perhaps you could post some of your code. I think you don't fully get the LabVOOP yet and it would be easier to see what you don't understand correctly if we could see your code or relevant parts of it. Tomi Quote Link to comment
Thang Nguyen Posted February 28, 2007 Author Report Share Posted February 28, 2007 Sorry, I do not use LabVoop. I am using GOOP. I attach here the way I try to create multiple instaces on one class. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.