hello, is it possible that when i run a program on computer A, it will trigger the serial port of computer B so that another program in computer B will run? The computers are connected by a null modem cable and both programs are written in C++ language and is running in a console application.
The programs are actually a kind of text file transferring between two computers where computer B will read a content from an existing textfile in that computer and send it line by line untill the end of line to computer A and exits itself. Computer A will log the textfile content into a newly created textfile.
The program is currently working but i have to run the program in computer A first which will start polling for an input and then i go to computer B to click and run the program so that it will start transferring.
My question is, can i do it in a way that when i run the program in computer A, it will automatically trigger the program in computer B to run without having to click on the program in computer B to run? If it is possible, how can i do it in c++? Does the program in computer B have to be in a sleep mode? I can paste the code for the programs in computer A and computer B if needed. Thanks!
triggering another program to run using serial port
Started by infineonintern, Jul 20 2009 11:29 PM
3 replies to this topic
#1
Posted 20 July 2009 - 11:29 PM
|
|
|
#2
Posted 21 July 2009 - 12:33 AM
You would always need a program on both computers, one could be a system service listening to the serial port on B, or a program that's always in startup.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#3
Posted 22 July 2009 - 01:01 AM
Orjan said:
You would always need a program on both computers, one could be a system service listening to the serial port on B, or a program that's always in startup.
How can i run a system service? Will the system service be taking alot of space? Can the system service be in sleep mode? new in serial port and c programming, pls guide!
#4
Posted 22 July 2009 - 01:30 AM
I have no experience in programming it, but I know it can be done. A service is a program in sleep until something triggers it, like a Web server, does nothing until someone calls for a page.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall


Sign In
Create Account

Back to top









