next up previous 264
Next: AST_XMLCHAN - Create an XmlChan
Up: AST Routine Descriptions
Previous: AST_WINMAP - Create a WinMap


AST_WRITE - Write an Object to a Channel

Description:
This function writes an Object to a Channel, appending it to any previous Objects written to that Channel.
Invocation:
RESULT = AST_WRITE( THIS, OBJECT, STATUS )
Arguments:
THIS = INTEGER (Given)
Pointer to the Channel.
OBJECT = INTEGER (Given)
Pointer to the Object which is to be written.
STATUS = INTEGER (Given and Returned)
The global status.
Class Applicability:
FitsChan
If the FitsChan uses a foreign encoding (e.g. FITS-WCS) rather than the native AST encoding, then storing values in the FitsChan for keywords NAXIS1, NAXIS2, etc., before invoking AST_WRITE can help to produce a successful write.
Returned Value:
AST_WRITE = INTEGER
The number of Objects written to the Channel by this invocation of AST_WRITE (normally, this will be one).
Notes:
  • A value of zero will be returned if this function is invoked with STATUS set to an error value, or if it should fail for any reason.

  • Invoking this function will usually cause the sink function associated with the channel to be called in order to transfer a textual description of the supplied object to some external data store. However, the FitsChan class behaves differently. Invoking this function on a FitsChan causes new FITS header cards to be added to an internal buffer (the sink function is not invoked). This buffer is written out through the sink function only when the FitsChan is deleted.


next up previous 264
Next: AST_XMLCHAN - Create an XmlChan
Up: AST Routine Descriptions
Previous: AST_WINMAP - Create a WinMap

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 210
R.F. Warren-Smith & D.S. Berry
24th May 2011
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2009 Science \& Technology Facilities Council