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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Reading files using C++

  • 12-01-2005 6:48pm
    #1
    Registered Users, Registered Users 2 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