OOP Design: controllin​g multiple (similar) devices

Hi guys,
We have some software that controls different kinds of "widgets." They are identicle  in function, but they are from differering vendors and have different drivers and APIs. But here's the tricky part: they may be used by themselves, or in any combination you can  think of, up to 3 at a time. 
Currently, we use a seperate version of our software for each widget combination, duplicating a massive amount of code-  since the only thing we do with each widget is configure it, then read its data (which it continuously takes), then close it when the program is closed. The rest of the software is the same. 
I'm wondering what the best approach would be to combine the code. I'm thinking LabVIEW Classes would be a good approach, but, I am new to OOP so I'd like some advice with the design. I've seen the example "Board Testing", that looks interesting and somewhat similar - there they use a different subclass for each board. Analogously I guess I would use a different subclass for each widget. But I'm not sure this is a good idea, since I can have various combinations of the widgets. My main class wire would then have to contain multiple sub-classes. 
Any ideas?

pobrepablo1 wrote:
OK, with these comments in mind I've created an Initialize method. "Wrapper" is the name of the driver refnum.
I'm calling this subvi with "initialize" as the argument iff First Call? is true. I think this is the best approach? Or at least simplest for me. I've never used DVRs before (except on a TV... )
This would not be the way that I would implement this. First of all I would have explicit methods for my operations instead of implementing like the old style action engine. Also, I would store the data in the class private data, not in unitialized shift registers. I would consider using a better name than "Wrapper". It is a poor name for your data.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Similar Messages

  • Design Suggestions for Multiple DaqMX Task Streaming App?

    I'm working on a LabVIEW application in which I'm streaming high-speed data to disk from multiple PXI devices simultaneously.  Each device has its own DaqMX task, and all tasks stream to the same file.  The PXI device configuration (which devices are in the chassis, which slots they're in, and which channels to read from each device) is determined at runtime.
    Does anyone have a suggestion for a design model for this?  To make matters worse, I'd like to be able to specify a channel to monitor its data during the streaming.  I'm thinking the Producer-Consumer model is the basic approach, and I'm at the point where I have an array of DaqMX tasks, one for each device.  I could probably extend that array to be an array of clusters containing:
       1) DAQ Command (e.g. Initialize, Start, Stop, Acquire, etc)
       1) Task ID
       2) Control reference to 2-D array (where each DaqMX read can be stored)
       3) Array of channel names (to allow selection of channel to be monitored
    This could be passed as notifier data, to a data collection subVI, but the part I'm struggling with is finding the best way to run X number of tasks in parallel, where X is not known until runtime.
    Any suggestions would be appreciated.

    Thanks for the input.  With regards to the file format, the decision has been made by my superiors not to use TDMS - unfortunate, but NI hasn't provided the information to write a MatLab file reader, which is a requirement.  So, I've created a custom file format tailored to the needs of my application, but generic enough to be used for other apps. With it, I've been able to stream 8 channels at 800KHz (4 channels each from 2 PXI-6120s) without breaking a sweat.  However, the performance varies greatly depending on which slots the cards are in (but that's a whole different discussion - see the PXI forum for that one).  Once NI solves that one, I'll feel a lot more comfortable.
    I have already made reentrant subVIs that can perform a specific DAQ task.  The problem with a for loop is that the VI sits and wait for a start trigger, then acquires the streaming data.  I can't start the next VI because I'm in the first one.  I thought about creating a data collection VI, and this VI would start up to 6 other VIs in parallel, based on how many and which cards were present.  It's a bit messy, because each slot can contain one of two devices, so I'd need to check which type it was before calling it.  I'm thinking I'll have to create the task list and the references to the data in the main GUI loop, and then pass this using a notifier or queue to the data collection loop. 

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • Please help - multiple IOS devices, Apple ID's and synching

    I have an iPhone and an iPad Mini that belong to me.  Two of my kids have iPod Touch and soon a third will have one.  So there are multiple iOS devices in the family, two of which are used only by me.  Up to this point I've been managing them on one laptop running one iTunes library.  I've made various playlists for the kids music, and I gave them each the specific games they wanted, and I put the games I wanted on my devices....certain games for the iPhone and larger, more involved games for the iPad Mini.  I don't put music on the iPad because I only use music on my iPhone.  So all 4 devices have a different selection of games, apps, and music on them.  I've purchased everything with one apple ID....mine, and set each device up with it. Only I know the password so if one of the kids wants something, they still have to bring their device to me so I can put the password in for that purchase.
    What I'd like to do is separate my kids apple ID's from mine.  This way, they can use their apple ID's to sign up for other services, have their own saved game data in the cloud, etc.  I'm running into situations where my son and I play the same game, but we keep overwriting each other's game progress because it's stored to my apple ID.  But I still want to be able to control their purchasing, so I figured I'd have to attach my credit card to their new ID's as well, but just not give them the password, so they still will have to come to me to punch in the password to download something.  But hopefully with this new setup, they'll have their own saved game progress that won't interfere with mine, even if we play some of the same games. 
    But how will this work if we synch them off my laptop?  I don't want to get into creating separate libraries or anything like that, and I'd still like to be able to download some apps using iTunes and put them on the devices manually if I need to. 
    What is your recommendation on how to handle this???  How will it work exactly?

    You can do anything you want with one iTunes, but:
    Devices names must be different.
    Don't sync anything under "Info" tab like Contacts Calendars etc. These info must be synced over iCloud. (Use a different Apple ID for each device)
    Use the Same Apple ID for iTunes and App Stores settings in all iOS devices.
    Message was edited by: cheonweb

  • HT5538 I have multiple Apple devices and my family all share one apple ID.  I know it is easy to obtain additional IDs but all devices are registered with the same Apple ID.  My questions is how do I set up my devices so that we can Facetime between devic

    I have multiple Apple devices using the same Apple ID for all devices.  I work in the Middle East and my wife is in Russia.  I would like to Facetime between my different devices.  Is this possible with all devices registered with the same Apple ID.  It is just easier for find my iPhone, iPad, MacBook Pro and MacBook Air and for purchasing Apps.  Is this possible and how do I set it up.

    Create Apple IDs for everyone individually and use that in Settings > Facetime, Settings > Messages, Settings > Game Center but keep the Apple ID used for app and content purchases in Settings > iTunes and App Stores

  • Can multiple Virtual Devices use the same IVI Driver Sessions?

    I am using Switch Executive 2.0 and I'm having problems creating multiple Virtual Devices.
    I have created a virtual device on a development computer that has no hardware connected to it.  This virtual device uses specific drivers to simulate the devices.  The problem I'm having is that when I create a second virtual device and try to add the same IVI Switches as the first Virtual device, I'm getting the following error:
    An error has occurred while attempting to access the device deviceA_ivi.
    Error -223116 occurred:
    Internal Software error occurred in Switches software.  Please contact National Instruments Support.
    File name: .\source\mxsWrappers\tMXSObject.cpp
    Line Number 192:
    Status Code: -223116
    Can someone please explain why?

    Can you please elaborate on how did you create those simulated devices? Namely, what does your IVI configuration look like? What does the driver session for the logical name look like? What's the software module? What's the hardware module? What is the driver setup string, and what is the simulation mode for the device in question?
    -Serge
    Srdan Zirojevic

  • How to FaceTime and iMessage on multiple apple devices with one iTunes account

    We recently received iPad 2's for Christmas and was looking for some advice on how to FaceTime and iMessage on multiple apple devices with One iTunes Account (Apple Id).  I have created or attached other e-mail addresses to our apple id but do not know how to use them on the new devices.  Our home MacBook Pro uses our main apple id for FaceTime.  The iPads have been setup with the main apple id w/o being able to use FaceTime and iMessage.
    Please Help...
    I appreciate the help and support.

    P and V-
    If you are trying to connect to someone with a different Apple ID, I think all the devices should work, but one at a time.
    The problem is when you try to connect between two with the same Apple ID.  Once the calling device tries to make the connection, it finds the second device to be "busy".  That is where each needs to use a different E-Mail address when setting it up.
    On iOS devices, when you press the Home button to exit an App, the App may still be active in the background, even when the device is sleeping.  If FaceTime or iMessage is merely being active that way, it may be enough to "tie up" the E-Mail address.
    From the Home screen, double click your Home button.  You will see a list of recent Apps along the bottom of the screen.  Press and hold on one of them until they start to wiggle.  You will then see a red minus sign on each.  Pressing the minus sign will remove an App from the list, and stop it from working in the background.  (Click the Home button to stop the wiggling, and again to hide the recent Apps.)
    Fred

  • Multiple iOS devices on same apple id

    I have a an iPad and two iPhones on the same apple ID. Unfortunately iMessage and face time show I am taking with myself. Is there a way to separate the communication to sub accounts or by device?  I would like to keep control of the apple ids as a child is involved.
    Perhaps there is a recommended way of setting up multiple devices for a family, maybe a KB article?
    Thank you.

    These might be of interest:
    http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l

  • How do I manage multiple itunes devices ?

    How do I manage multiple itunes devices with other family members on a single computer?
    I do not want to share libraries.

    There's a couple of options (other than using specified playlists or manual management out of a single library).
    The following document is worth checking through: 
    How to use multiple iPods, iPads, or iPhones with one computer

  • Screen ipad doesn't respond during video viewing home sharing with multiple iOS devices simultaneously

    A have a problem with the videos app and iTunes home sharing on multiple iOS devices.
    This is my setup. On my iMac 2006 with Snow Leopard I have:
    - 100+ dvd's ripped in my iTunes movie section
    - 600+ episodes ripped in iTunes TV-section in 35 TV-shows
    - 1 apple tv, 1 iPad 2, 1 iPad mini
    On an average evening my family is watching different tv-shows simultaneously on the apple tv, the ipad, an iphone, and an ipad mini.
    This is done through home sharing on the one iTunes library.
    All updated apps, software etc..
    What happens on the ipads, after viewing for more than 10 minutes, the user interface doesn't show up when tapping the screen. The touchscreen doesn't respond, only the home button works. Clicking the home button closes the app, but the sound of the video keeps on playing. Opening up the videos app again gives a black screen with sound still playing and still no button or UI.
    The only workaround which currently works is killing the videos app. Power off the ipad and power on again, reconnect to the shared library, wait until it has found all the content (1+ minutes) and startup the tv show again.
    All in all, a nasty way to pause your viewing or switching to another movie of tv episode, or even wanting to finish viewing.
    The problem has haunted me for a year now, patiently waiting and hoping software-updates would fix it. They didn't.
    A fix would obviously hugely improve my user experience, getting it on par with Apples usual quality of service.
    Anyone familiar with this problem? Apple: is it possible to fix it in an update?

    Same here for over a year now.
    You cant imagine how happy i am that im not the only one with this problem.
    many of frinds have the same setup as me (ipad 2, 27"imac, express, apple tv 2)
    No problem
    I had the problem on Snow Leopard, lion and now on mountain lion.
    I'am also starting to get a new problem - sometimes when waching a movie on iPad or ATV it just quits the movie and you have to start it again
    on the iPad most of the time it also shows the wrong cover art. I tried all the hints here, and i works for a day or two then its wrong again
    I store my itunes library on an external drive - you ???

  • How to manage multiple users/devices/Apple IDs on a single computer

    I got my 8 year old an iPad mini for Christmas and I'm about to set it up but I need some advice on using multiple IDs on one computer. I have an iPhone 4s. I assume I will need another Apple ID for the iPad mini so she can use Facetime. How do you manage two devices with different IDs on one computer? Will my movies and music be available for the iPad mini ID? What happens when I plug the iPad into my computer? Do my iPhone apps on my account disappear? Do I need to log out of my iTunes store account? Is their a danger in mixing the two accounts? I was told to be careful if you plug another iPhone into your computer because it can wipe your phone and replace it with another users info if you don't log out/in correctly. It's very confusing so if anyone could give me some advice on how to set this up and manage two IDs and devices on one computer it would be helpful. Thanks:)

    This should be of some help.
    How to use multiple iPhone, iPad, or iPod devices with one computer
    Your daughter is too young to have an Apple ID because the minimum age is 13 years old. You can use her email address for FaceTime and Messages. You add the address as the contact address when you activate both of those apps. But both apps will still have to be tied to your Apple ID.
    I was managing 5 different devices with one iTunes library and all devices had their own unique content on them. It is not that difficult to manage.
    there is lots and lots of information out there on how to do this. Check some of these out for more information.
    https://www.google.com/search?q=managing%20multiple%20devices%20with%20one%20iTu nes%20library
    This will help with FaceTime and Messages.
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l

  • Managing multiple iOS devices on different Apple accounts from the same iMac

    May be a very simple question to answer, but can I manage multiple iOS devices on different Apple accounts from the same iMac?
    I ask as whilst I'm totally Mac'd, my partner who has her own Apple account has a Winows laptop and experiences problems updating iOS software on her iPhone 4S and iPad 3 Gen via the laptop. I'm thinking the problems may be overcome if we manage her iOS devices through my iMac.

    Thanks dwb .... I thought there'd be a catch .... not to keen on all that media and apps on my iMac!
    The specific problem is that whenever she updates to the latsest version of iOS using the latest iTunes for Windows on her PC laptop she seems to lose something in the process. One time she lost all her texts and the other day when updating to 5.1.1 she lost all her reminders. Not the end of the world but frustrating and shouldn't really happen and doesn't happen to me using the iMac and OSX.

  • If I have multiple apple devices and use the same iCloud login on them, shouldn't apple give us more iCloud storage for each device

    If I have multiple apple devices and use the same iCloud login on them, shouldn't apple give us more iCloud storage for each device

    Welcome to Apple Support Communities
    No. Apple only offers 5 GB of free iCloud storage for all your devices, no matter how many you have got. If you need more iCloud storage, purchase storage.

  • Is there a way to send and receive SMS on multiple cellular devices without using iMessage?

    I currently own a cellular iPad mini and an iPhone 4s and would like SMS to be the same on both devices as well as my desktop.
    After many months of struggling with iMessage, I decided to turn it off entirely.  I discovered that my best friend did not receive dozens of my texts over the span of a few months (I compared our message history side by side).  Seems like it had something to do with traveling in and out of wifi zones or possibly conflicts between our two carriers, ATT and Verizon.  Regardless, I am not willing to dive into iMessage fully until this gets sorted out.  Further, SMS is the standard message format for everyone outside of the Apple sphere, and I do not feel comfortable lumping them together into one app.  If I decide to switch to Android, will all of my contacts with iPhones continue sending me iMessages?
    Thank you for your help!

    Is there a way to send and receive SMS on multiple cellular devices without using iMessage?
    Search the iTunes App Store for any 3rd party SMS apps that may be available.
    If I decide to switch to Android, will all of my contacts with iPhones continue sending me iMessages?
    Android phones don't receive iMessages, they can recieve SMS messages sent through the iOS Messages app. The app that your contacts choose to use to send you messages is completely up to them.

  • Why can I no longer configure multiple unsupervised devices?

    It looks like Apple Configurator removed the ability to install a profile to multiple unsupervised devices, and makes the act of doing so with a single device much more laborious.
    I use Apple Configurator to install a small profile that pushes a trust certificate, WiFi config, and Web Clip to enroll the device on our MDM server. I often set up large batches of iPads at once, so this made the process of getting each one onto our WiFi and enrolled much quicker. We have multiple admins on this network, and don't want to tie the devices to a single computer/Configurator install.
    Any suggestions?

    Unfortunately, even folllowing http://support.apple.com/kb/HT5833 it still appears impossible to use Apple Configurator to install multiple profiles on even one device at once without using Supervise mode.
    So, if I want to install a profile which connects the device to a WiFi network (without which enrolment will fail) and then a Trust and Enrollment profile, I seem to have no option but to go through three cycles installing profiles, rather than allowing Configurator to automatically install each profile in turn in one pass.
    This is extremely frustrating and VERY time consuming for mass deployments!!

Maybe you are looking for

  • Overlapping Number Ranges for GL Accounts - does this allow duplicates?

    Hi there,. I am just-trying to understand GL numbering ranges. If I create two GL account groups with overlapping number ranges, what (if anything), is stopping me from creating two GL accounts with identical numbers.  When l try to do this in fs00 I

  • Error handling in DATA MIGRATION

    hi i am a beginner in sap abap. i am learning data migration techniques . so i wanted to know that what are the possible error in bdc and lsmw apart from error of data in flat file.And how handle those errors. if anyone can share his/her experience b

  • Call objects from query by double click

    Hi guys, one question:in a query when I have my output list is it possible execute a double click on a field and call the object'(example my query goes out some fields ex the fields of number PO and double click and call ME23N and watch the PO),if ye

  • HP Officejet J6480 All-In-One'[]

    I am running windows vista and I am able to print doc. from  my files and off the web,  but...I can not print my pictures that I have filed but was able to a week ago.  Does anyone have any suggestions? I have checked all the off line/on line, que, p

  • Adobe Premiere Elements plugin for fisheye/barrel distortion correction

    I want to correct the fisheye/barrel lens distortion in a GoPro MP4 video recording. Can Adobe Premiere Elements do this (I've searched for such a function in my APE 11 without success) or is there a plugin which will do this and which is compatible