OpenQNX :: The QNX Community Portal

Oct 06, 2008 - 06:47 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 44 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
AjitG
Post subject: AutomateFTP of screen capture  PostPosted: Jul 26, 2007 - 02:41 AM
New Member


Joined: Feb 09, 2007
Posts: 8

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/article_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
 
 View user's profile Send private message  
Reply with quote Back to top
AjitG
Post subject: Sorry for posting in newsgroups  PostPosted: Jul 26, 2007 - 02:51 AM
New Member


Joined: Feb 09, 2007
Posts: 8

hi,
I am sorry for posting the above question in news group.
I have added the same question under"Genral Programming" topic.
Thanks,
Ajit
 
 View user's profile Send private message  
Reply with quote Back to top
Yuriy Synytskyy
Post subject: Re: AutomateFTP of screen capture  PostPosted: Jul 30, 2007 - 01:49 PM
Guest





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...
Quote:
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/article_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
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.