Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Reading files using C++

Options
  • 12-01-2005 7:48pm
    #1
    Registered Users Posts: 976 ✭✭✭


    Hi all,
    For my project, I need to send robot direction instructions from a mobile phone firslty to the server computer and then onto a robot via a radio packet controller link.
    Currently, I've made the GPRS connection with the server computer and I am writing the Robot direction Instructions, A for Forward, B for Right etc into a file on the C drive using java.
    Does anyone have any ideas how I can instantly read this file using a C++ program to send them to the robot via an RPC interfaced to the computer via the NI-DAQ card. I need to use C++ as it controls the NI-DAQ card.
    Can I write to a file using java and at the same time keep reading the file using C++. I presume I'd need to delete the contents of the file after each robot direction instruction is sent.
    Can anyone please offer any advice on this or maybe suggest a better way of overcoming the situtation
    Thanks and Regards
    Glenman


Comments

  • Hosted Moderators Posts: 7,486 ✭✭✭Red Alert


    I think what you may be looking for is called a Pipe, as it 'pipes' the output from one program into another. It's like a file that never makes it onto a disk. Very easy to do in unix, AFAIK windows is also easy enough. Check a I/O pipes in a textbook.


Advertisement