Skip navigation.
Home
The QNX Community Portal

View topic - AutomateFTP of screen capture

AutomateFTP of screen capture

Read-only archive of qnx.gui (Creating graphical applications within a GUI environment, such as Photon or PhAB) at inn.qnx.com

AutomateFTP of screen capture

Postby AjitG » Thu Jul 26, 2007 2:41 am

Dear Members,
I am working on a system which displays real-time images grabbed from a line sensor. Each grabbed image is displayed on the screen using a simple photon application developed by me. Everything works fine till here.

There is a new feature addition to be done to the above mentioned system. It is capturing the screen shots of the full screen photon application and sending the captured image to a FTP server automatically.
I am using PxWriteImage() function to save the screen-capture in jpeg format. (Please see http://www.qnx.com/developers/articles/ ... 293_1.html for more information)
After the screen-capture file is saved to local hard disk, I want it to transfer to another machine using FTP.
For this I have written following shell script and I invoke it through system() command passing the filename as argument 1 ( $1 )

#!/bin/sh
USER=AjitG
PWD=ABC
LOCAL_FOLDER=/root/personal/jpeg/
SERVER=192.152.1.19
ftp -n -i $SERVER <<SCRIPT
user $USER $PWD
bin
lcd $LOCAL_FOLDER
mput $1
bye
SCRIPT


The above design works for few iterations and later the entire system is stalled.
I have checked with FTP server machine... only few files are transmitted.

Can you guide me what could be the possible reason for hanging of the system?

Thanks,
Ajit
AjitG
New Member
 
Posts: 8
Joined: Fri Feb 09, 2007 7:32 am

Sorry for posting in newsgroups

Postby AjitG » Thu Jul 26, 2007 2:51 am

hi,
I am sorry for posting the above question in news group.
I have added the same question under"Genral Programming" topic.
Thanks,
Ajit
AjitG
New Member
 
Posts: 8
Joined: Fri Feb 09, 2007 7:32 am

Re: AutomateFTP of screen capture

Postby Yuriy Synytskyy » Mon Jul 30, 2007 1:49 pm

Ajit,
1.. I would have checked return code of system()
2.. What exactly happens when all is stalled - I would have run pidin
Yuriy





"AjitG" <ajitgh@goowy-dot-com.no-spam.invalid> wrote in message
news:f895g5$ctg$1@inn.qnx.com...
Dear Members,
I am working on a system which displays real-time images
grabbed from a line sensor. Each grabbed image is displayed on the
screen using a simple photon application developed by me. Everything
works fine till here.

There is a new feature addition to be done to the above
mentioned system. It is capturing the screen shots of the full
screen photon application and sending the captured image to a FTP
server automatically.
I am using PxWriteImage() function to save the screen-capture
in jpeg format. (Please see
http://www.qnx.com/developers/articles/ ... 293_1.html for more
information)
After the screen-capture file is saved to local hard disk, I want it
to transfer to another machine using FTP.
For this I have written following shell script and I invoke it through
system() command passing the filename as argument 1 ( $1 )

#!/bin/sh
USER=AjitG
PWD=ABC
LOCAL_FOLDER=/root/personal/jpeg/
SERVER=192.152.1.19
ftp -n -i $SERVER <<SCRIPT
user $USER $PWD
bin
lcd $LOCAL_FOLDER
mput $1
bye
SCRIPT


The above design works for few iterations and later the entire system
is stalled.
I have checked with FTP server machine... only few files are
transmitted.

Can you guide me what could be the possible reason for hanging of the
system?

Thanks,
Ajit
Yuriy Synytskyy
 


Return to qnx.gui

Who is online

Users browsing this forum: No registered users and 1 guest