comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Passing file LUN to C routine
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Passing file LUN to C routine [message #34993] Tue, 06 May 2003 11:22 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Hello,

I have IDL interfaced (via DLM in C) with a frame grabber for collecting
video. I want to pass a file's LUN to C (repeatedly) so that the C
routine can write the most recent frame to to the file. My idea is to
place IDL in an interruptable loop (widget timer); in each iteration the
C routine is passed the LUN, writes the image and then returns a flag
such as the number of bytes written to IDL. Later I'll poke around with
the images by using an ASSOCiated variable within IDL.

It's a reasonable plan that is rapidly going amuck; what I have tried so
far causes IDL to crash. I have been using the IDL_FileStat() function
to get the required FILE pointer for C. The compiler doesn't C complain
about the setup; but it kills IDL when I run it. Methinks
IDL_FileStat isn't my friend anymore.

So ...

(1) How do I properly convert the LUN in IDL into a FILE pointer? (I
guess the question maybe better phrased as how do I get IDL to give me
the FILE pointer associated with the LUN I pass?) I think I need this
because the C routine fwrite requires it.

(2) Is this creating an unstable situation by leaving the file open all
the time until some condition is met in IDL?

(3) Would I be better off passing the filename to C and having C
open-write-close for each iteration?

Thanks,
Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: bug(s) in IDL5.6?
Next Topic: RFC 1: Common functions for beginners

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:28:24 PDT 2025

Total time taken to generate the page: 0.00567 seconds