comp.lang.ada
 help / color / mirror / Atom feed
* Ada file IO & vxworks
@ 1998-08-10  0:00 Doug Lewis
  1998-08-10  0:00 ` Corey Ashford
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Lewis @ 1998-08-10  0:00 UTC (permalink / raw)


I'm having problems using the text_io file operations on a PPC board
running vxworks 5.3.1, the host is a NT pc.  I'm able to successfully
create and write to a file but the task doesn't perform the close
operation and I can find no existance of the file on the pc host.  Can
anyone provide some ideas about file operations that they successfully
implemented in an Ada/vxworks environment?

Thanks,
--
Doug Lewis             ----------------------------------
Senior Software Eng    - The views expressed are my own &
Raytheon Systems Co.   - do not necessarily reflect those
                       - of Raytheon Systems Company
                       ----------------------------------






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada file IO & vxworks
  1998-08-10  0:00 Ada file IO & vxworks Doug Lewis
@ 1998-08-10  0:00 ` Corey Ashford
  1998-08-10  0:00   ` Steve O'Neill
  1998-08-11  0:00   ` Doug Lewis
  0 siblings, 2 replies; 5+ messages in thread
From: Corey Ashford @ 1998-08-10  0:00 UTC (permalink / raw)



Doug Lewis wrote in message <35CF08D2.BA545027@ti.com>...
>I'm having problems using the text_io file operations on a PPC board
>running vxworks 5.3.1, the host is a NT pc.  I'm able to successfully
>create and write to a file but the task doesn't perform the close
>operation and I can find no existance of the file on the pc host.  Can
>anyone provide some ideas about file operations that they successfully
>implemented in an Ada/vxworks environment?
>

Which Ada compiler are you using?

Since you aren't closing the file, it's possible that VxWorks and/or
the Ada text_io implementation are buffering up the writes.  You
might trying adding a call to Ada.Text_Io.Flush(<file>) after any
writes that you want to be seen on the host.  However, that will only
flush the Ada side, not the VxWorks side.  You may have to close
the file periodically and reopen it with the mode set to Append_File.



- Corey







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada file IO & vxworks
  1998-08-10  0:00 ` Corey Ashford
@ 1998-08-10  0:00   ` Steve O'Neill
  1998-08-11  0:00   ` Doug Lewis
  1 sibling, 0 replies; 5+ messages in thread
From: Steve O'Neill @ 1998-08-10  0:00 UTC (permalink / raw)


Make sure that your board can FTP into the NT host.  The file is buffered
in memory on the target board until the Close is invoked.  At this time
vxWorks transfers the complete file to the NT host via FTP.  It can appear
that this is working fine when, in fact, the transfer will fail.  I've been
burned by this in the recent past.

On the flip side, when you open an existing file VxWorks transfers the
entire contents of the file from the host into local target memory.

Steve O'Neill

Corey Ashford wrote:

> Doug Lewis wrote in message <35CF08D2.BA545027@ti.com>...
> >I'm having problems using the text_io file operations on a PPC board
> >running vxworks 5.3.1, the host is a NT pc.  I'm able to successfully
> >create and write to a file but the task doesn't perform the close
> >operation and I can find no existance of the file on the pc host.  Can
> >anyone provide some ideas about file operations that they successfully
> >implemented in an Ada/vxworks environment?
> >
>
> Which Ada compiler are you using?
>
> Since you aren't closing the file, it's possible that VxWorks and/or
> the Ada text_io implementation are buffering up the writes.  You
> might trying adding a call to Ada.Text_Io.Flush(<file>) after any
> writes that you want to be seen on the host.  However, that will only
> flush the Ada side, not the VxWorks side.  You may have to close
> the file periodically and reopen it with the mode set to Append_File.
>
> - Corey







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada file IO & vxworks
  1998-08-10  0:00 ` Corey Ashford
  1998-08-10  0:00   ` Steve O'Neill
@ 1998-08-11  0:00   ` Doug Lewis
  1998-08-13  0:00     ` Stephen Leake
  1 sibling, 1 reply; 5+ messages in thread
From: Doug Lewis @ 1998-08-11  0:00 UTC (permalink / raw)


Corey Ashford wrote:

> Which Ada compiler are you using?
>

We're using the Green Hills Ada95 compiler.

> Since you aren't closing the file, it's possible that VxWorks and/or
> the Ada text_io implementation are buffering up the writes.  You
> might trying adding a call to Ada.Text_Io.Flush(<file>) after any
> writes that you want to be seen on the host.  However, that will only
> flush the Ada side, not the VxWorks side.  You may have to close
> the file periodically and reopen it with the mode set to Append_File.
>

Unfortunately no file closes are completing successfully!  We've tried just
doing a create then close and the code doesn't return from the close.
We're getting no exceptions from the Ada code or the os.

--
Doug Lewis             ----------------------------------
Senior Software Eng    - The views expressed are my own &
Raytheon Systems Co.   - do not necessarily reflect those
                       - of Raytheon Systems Company
                       ----------------------------------






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada file IO & vxworks
  1998-08-11  0:00   ` Doug Lewis
@ 1998-08-13  0:00     ` Stephen Leake
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Leake @ 1998-08-13  0:00 UTC (permalink / raw)


Doug Lewis wrote:
> <snip>
> 
> Unfortunately no file closes are completing successfully!  We've tried just
> doing a create then close and the code doesn't return from the close.
> We're getting no exceptions from the Ada code or the os.

I'm thinking of using VxWorks on our next project, so I'd like to know
how good their tech support is. This sounds like a simple question for
the VxWorks tech support people; did you call them, and were they
helpful? 

-- Stephe




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-08-13  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-10  0:00 Ada file IO & vxworks Doug Lewis
1998-08-10  0:00 ` Corey Ashford
1998-08-10  0:00   ` Steve O'Neill
1998-08-11  0:00   ` Doug Lewis
1998-08-13  0:00     ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox