next up previous 264
Next: astWriteFits - Write out all cards in a FitsChan to the sink function
Up: AST Function Descriptions
Previous: astWinMap - Create a WinMap


astWrite - 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.
Synopsis:
int astWrite( AstChannel $*$this, AstObject $*$object )
Parameters:
this
Pointer to the Channel.
object
Pointer to the Object which is to be written.
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 astWrite can help to produce a successful write.
Returned Value:
astWrite()
The number of Objects written to the Channel by this invocation of astWrite (normally, this will be one).
Notes:
  • A value of zero will be returned if this function is invoked with the AST error status set, 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: astWriteFits - Write out all cards in a FitsChan to the sink function
Up: AST Function Descriptions
Previous: astWinMap - Create a WinMap

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
25th February 2013
E-mail:starlink@jiscmail.ac.uk

Copyright (C) 2014 Science \& Technology Facilities Council