Best way to pass data back and forth from multiple NativeProcess threads

Hi all,
We have an application that requires multiple concurrent accesses to mulitple instances of a java NativeProcess. The input and output is XML data. I can see how to shunt this back and forth with only a single listening thread on stdout, but with multiple threads the whole thing is going to get rather jumbled. At the moment we are looking at using temporary files to read and write data from each instance, but I wonder if there might be a better way ... any suggestions?
Thanks.

I may not be completely understanding your issue...however you should be able to check which NativeProcess instance is giving you stdin/stdout/stderror data by checking the target member of the ProgressEvent. If that is not helpful, could you please provide some additional information about what you are trying to do, and what trouble you are running in to?
Thanks,
Chris Thilgen
AIR Engineering

Similar Messages

  • Best way to pass data to and from a fieldpoint unit

    Hello,
    I am just starting to play with a fieldpoint unit and I was wondering the best way to send and receive data with it.  We are setting up a pumping station and need to send the FP a setpoint and be able to read other sensor connected to it.  I know there are at least a few options such as data socket, publish data, shared variables and maybe tcp/ip.  But I was wondering as to the best/easiest option.
    Thanks

    For case #1, you wouldn't have to do anything special.  The setpoint would just remain at whatever value was last written to it by the host system (the one where you are at the controles).
    For something like #2, you would probably want an extra routine, such as read the timestamp of the shared variable, if the cFP sees that it is too old (whether that would be a minute, an hour, a day ....) then the code goes into a pump down routine.  Another possibility would be a watchdog type of shared variable.  The host system periodically increments a counter and sends it to a shared variable on the cFP.  If the cFP sees that the counter hasn't incremented in a given period of time, then it can assume a connection was lost and do the shutdown routine.
    Going with shared variables will definitely get you started quicker.  Good luck with your application.

  • Best way to send files back and forth between PC and Mini

    I know something similar like this has been asked a million times, but I couldn't quite find the answer I need. Basically I work on the PC and my new Mac Mini, and I want to be able to quickly share files between both of them. I know I could use a USB stick, but seeing both machines are sharing the same internet connection on the same router I was thinking there's a way to do it with that or wirelessly? migration assistant seems to just be about sending files to the mac and that's it.
    Thanks for any advice.

    That would be a standard Windows issue, but for starters, take a look here:
    http://guides.macrumors.com/Networking_Windows_with_Mac_OS_X#Accessing_your_Mac_ from_your_PC
    Regards.

  • Best way to pass data sets to another program

    Hey
    I want to connect another (maths) program with my java application. Therefore I need to paste data (some kind of tab separated table) to this program.
    I try now to save these data in a separate newly generated file and to pass a command with Java's Runtime.exec() method to this program to read these data. Is this a good idea or might there be better ways?
    If I do so, is there a way in Java to generate some kind of a "temporary" file which will be deleted automatically after usage or is this nothing else than to save it in a common file and delete it afterwards. What's the best way to pass data generally?

    Well, the connection will not be over a network, so I'd rather think it's not a Socket or RMI problem (unless someone convinces me).
    Yes it's very external, it's a C or C++ written program, I don't have any source codes. So far I generated a file for Input command and data, I passed that on to the maths program and returned the output into another file.
    Now I would like to separate the output and like to obtain some tables and graphical things like charts at the output. Do I have to generate three different types of outputfiles? How to store some graphics e.g. some distributions. I thought even of generating a database. I never thought about XML, I don't know if this works for that kind of problem?!

  • How do you attach multiple pictures to an email? I use yahoo, presently I copy and paste each pic separately , having to go back and forth from my pics and email. I know there's an easier way. I currently use an iPad 2 and this is my first apple product.

    I currently use an iPad 2,how does one go about attaching multiple pictures to a yahoo email? Presently I am having to copy then paste each picture
    Separately , going back and forth from my picture roll to my email. I tried to copy and paste multiple pictures but it would only paste the last picture
    I copied. I am new to apple, so any help would be appreciated .

    If you use the Mail App and configure a Yahoo account you can then select up to 5 pictures from the Photo App and mail them as a single e-mail.

  • I was using my ipad it was under 10% but no under 4% it turned off then i pluged the charger in and flashed on then showed apple sign after i turned it on. now its going back and forth from the apple sign and battery symbol ive changed chargers its not on

    hey please help!
    i was using my ipad it was under 10% but no under 4% it turned off then i pluged the charger in and flashed on then showed apple sign after i turned it on. now its going back and forth from the apple sign and battery symbol ive changed chargers its made no differnce its been like 3 hours ive tried to do that reset thing holding lock button and home button for 10 seconds at the same time. WHAT DO I DO?

    Could be the charger, cable or iPad. Plug the USB cable into your computer. It may say "Not Charging", however, it is charging slowly and will verify that the cable is good.
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    The quickest way (and really the only way) to charge your iPad is with the included 10W or 12W (5W on Mini) USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (2.5W, most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    How to Calibrate Your Mac, iPhone, or iPad Battery
    http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at
    Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
    New iPad Takes Much Longer to Charge Than iPad 2
    http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
    Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
    iPhone: Hardware troubleshooting (Power/Battery section also applies to iPad)
    http://support.apple.com/kb/TS2802
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    iOS 7 Battery Life Draining Too Fast? It’s Easy to Fix
    http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/
    New iPad Slow to Recharge, Barely Charges During Use
    http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
    iPad: Charging the battery
    http://support.apple.com/kb/HT4060
    Best Practices for iPad Battery Charging
    http://www.ilounge.com/index.php/articles/comments/best-practices-for-ipad-batte ry-charging/
    Tips About Charging for New iPad 3
    http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
    How to Save and Prolong the battery life of your new ipad
    https://discussions.apple.com/thread/4480944?tstart=0
    Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
    http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
    iPhone, iPod, Using the iPad Charger
    http://support.apple.com/kb/HT4327
    Install and use Battery Doctor HD
    http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
    To Extend a Device’s Battery Life, Get to Know It Better
    http://tinyurl.com/b67c7xz
    iPad Battery Replacement
    http://www.apple.com/batteries/replacements.html
    In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
     Cheers, Tom

  • I use my ipod for audible books downloads. In the past I have been able to move books back and forth from library to ipod according to what I was listening to.  I can no longer retreive books in the library. Any suggestions?

    I use  my 6th generation Ipod strictly for Audible downloads.  In the past, I have been able to move titles back and forth from the Ipod and my Itunes library, to control the amount books on the ipod. Recently, an exclamation mark has appeared next to the titles as I try to transfer to the ipod, and the book does not transfer.  Any suggestions on how to regain access to my purchased library? 

    1. You did not get an error message telling you that your iPhoto library was getting full. You got a message telling you that your HD was getting full, right?
    OS X needs about 10 gigs of hard drive space for normal OS operations - things like virtual memory, temporary files and so on.
    Without this space your Mac will slow down as the OS hunts for space on the disk, files will be fragmented, also slowing things down, apps will crash and the risk of data corruption - that is damage to your files, photos, music - increases exponentially.
    Your first priority is to make more space on that HD. Nothing else can be done until you do.
    Purchase an external HD and move your Photos and Music to it. Both iPhoto and iTunes can run perfectly well with the Library on an external disk.
    Your Library has been damaged from being run on an overfull disk.
    How much free space on it now?

  • Can photos be transferred back and forth from/to iPhoto and an external drive? If so, how?

    Can photos be transferred back and forth from/to iPhoto and an external drive? If so, how?

    When in iPhoto for iOS you can share your photo to iTunes and then connect your iPad to your computer and use the file sharing window to move the photo to any connected hard disk. Sharing to iTunes is the only way to maintain original file size when sharing a photo in iPhoto for iOS.

  • Switch back and forth from Chinese and English in Forms and Reports 6i

    How do you switch back and forth from Chinese and english in forms and reports 6i? Tried changing regional settings in the control panel. Tried changing registry entry for nls_lang from american and chinese, none of them work! Can anyone help?
    Chinese version of forms and reports 6i is installed. Only way I can change between english and chinese is to keep installing the version I want. Is there any other way?

    Check Forms Help for National Language Support.
    Monica

  • How do I toggle back and forth from the live site in the tutorial to the working site?

    How do I toggle back and forth from the live site in the tutorial to the working site?

    I think that if you scroll down the page to the third video, you will find what you're looking for.
    Best regards,
    Randy Nielsen
    Product Integration Manager, Creative Cloud Learning
    Adobe

  • How can I switch back and forth from Classic to Tiger

    How can I switch back and forth from OS9.2.2 to Tiger without restarting? I want Classic as my startup system.

    I think that the number of clicks to open a file is a rather shortsighted way to compare two operating systems.<<</div>
    Well excuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuse ME!
    I happen to think it's a pain to click twice on files when I'm used to clicking just once.
    But Tiger is a nice operating system. I enjoy that it has much more capabilities than the OS9. I mean, Tiger keeps up with the advancing internet. My beef is really against OS9. I can open OS9 in Tiger but not Tiger in OS9.

  • Can I message back and forth from ipad2 to Macbook air?

    Can I message back and forth from ipad2 to mabook air?

    I think that the number of clicks to open a file is a rather shortsighted way to compare two operating systems.<<</div>
    Well excuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuse ME!
    I happen to think it's a pain to click twice on files when I'm used to clicking just once.
    But Tiger is a nice operating system. I enjoy that it has much more capabilities than the OS9. I mean, Tiger keeps up with the advancing internet. My beef is really against OS9. I can open OS9 in Tiger but not Tiger in OS9.

  • How do I keep my iPad from switching back and forth from my Apple ID to my husbands Apple ID?

    How do I keep my iPad from switching back and forth from my Apple ID to my husbands Apple ID?

    Your question confuses me because there is no way that the iPad can switch Apple ID's without user input. Where are you seeing evidence of this?
    If you are seeing app updates that require your husbands ID, that's because those apps were purchased with his ID and will always require his ID and password for updates.
    If you are seeing his ID elsewhere, explain....

  • Transferring back-and-forth from home and work

    I need to transfer my Mail and Address book back-and-forth from home to work.
    1. Which files do I export from home?
    2. Where is it imported into work?
    3. Are there any known issues with the database files becoming corrupt from going back-and-forth like this?
    Thanks.

    what os are both macs running on?
    i would suggest you look at www.mac.com, the .mac service, if you want to sync various data between two macs - works with tiger and leopard os, but not panther.
    manually moving folders may be cumbersome and end up with unintended consequences, as in human error or other glitches.
    nonethless the folders that contain data for both mail and ab are respectively homefolder/library/mail and homefolder/library/mail downloads for mail and homefolder/library/application support/address book for ab.
    you will also have to copy the com.apple.mail.plist and com.apple.mail.searchhistory.plist - for mail - and the com.apple.addressbook.abd.plist and the com.apple.addressbook.plist files - for ab - all four located in homefolder/library/preferences.
    hope this helps

  • Need multiple 'MAIL' Icons.   Have two mail accounts and i want to keep them separate but want to EASILY switch back and forth from the main screen instead of going through, Settings, Mail, and selecting account. Major pain

    Have two mail accounts and i want to keep them separate but want to EASILY switch back and forth from the main screen instead of going through, Settings, Mail, and selecting account. Major pain the butt.  This has been a request from Apple users for many years.    it's great you can now combine all emails into one, but some people want them kept separate and have separate icons on the main page.   They could easily do this by having one "MAIL" account as white and another red.  Or put MAIL 1 and MAIL 2.    Or an actual label that the mail accounts are called on the ICONS!!  
    Help!

    eshghoolak wrote:
    ...I could switch back and forth between accounts while in the mailbox, with one button.  I think that is what you are referring to?  Whoever said it's just a simple switching - you obviously haven't had the pleasure of using an Android device.  It's not that quick to go back and forth - definitely not efficient...
    Not that it matters a lot, Android vs iPhone interface is largely a matter of personal preference and what you know... I'm not sure which one you're saying is not efficient...
    In any event...
    I currently have two email accounts setup.  My iPhone main page Mailbox settings reads:
    Mailboxes
    Inboxes
    All Inboxes
    Gmail
    [email protected]
    Accounts
    Gmail
    [email protected]
    I wish there an efficient way to move back and forth while in the "Inbox" between accounts.  Also, Why does one gmail account show as "Gmail" and another as the actually address?
    The names are based on the names you gave the accounts when you set them up.
    Settings>Mail, Contacts, Calendars.
    Tap the account you want to re-name. Go to the "Description" field and put in what ever you want.
    Second, there is no way to quickly choose a bunch of emails to delete. I have to manually go into each one and move it to the Trash folder.
    If you tap the edit button in the upper right while in mail, you can select multiple items to move, delete or mark (flag).
    I don't want any of the condescending remarks, that I've read here and in other forums.  I'm honestly looking for a solution, which I think you are too!  One thing I realized is that iPhone users in these forums are really defensive and quick to say "that's how it is, live with it, if you don't like it go away"  Um...the only thing that tells me is you are pretty bitter and have kept telling yourself that, to force yourself to like your device.  I prefer to express my issues, and find solutions.  There is ALWAYS a solution...
    I think what you will find is that many people here, myself included, tend to get a bit short with people who start off with attacks or whining about how something has been asked for for years and should be easy, rant about things that have already been beaten to death multiple times in the forums, talk about how much better Android or BB are at something (really... if it's that much better, why did they buy an iPhone to begin with?), etc., or continue to ask questions that could easily be answered with a simple search, or even just by looking back at the last dozen posts to the forum, half of which probably asked the EXACT SAME question.
    I don't think any of us go out of our way to be rude or uncivil.  That said, attacking the people who are attempting to help you is much more likely to generate a response of 'if you don't like it, go away', than it is to generate something that will be truly helpful.

Maybe you are looking for