astReadastRead
-
Read an Object from a Channel
- Description:
- This function reads the next ObjectObject from a ChannelChannel and returns a
pointer to the new Object.
- Synopsis:
- AstObject
astRead( AstChannel
this )
- Parameters:
-
this
-
Pointer to the Channel.
- Class Applicability:
-
FitsChanFitsChan
-
All successful use of astRead on a FitsChan is destructive, so that
FITS header cards are consumed in the process of reading an Object,
and are removed from the FitsChan (this deletion can be prevented
for specific cards by calling the FitsChan
astRetainFitsastRetainFits function).
An unsuccessful call of
astRead
(for instance, caused by the FitsChan not containing the necessary
FITS headers cards needed to create an Object) results in the
contents of the FitsChan being left unchanged.
-
StcsChanStcsChan
-
The AST Object returned by a successful use of
astRead
on an StcsChan, will be either a RegionRegion or a KeyMapKeyMap, depending
on the values of the StcsAreaStcsArea, StcsCoordsStcsCoords and StcsPropsStcsProps
attributes. See the documentation for these attributes for further
information.
- Returned Value:
-
astRead()
-
A pointer to the new Object. The class to which this will
belong is determined by the input data, so is not known in
advance.
- Notes:
- A null Object pointer (AST__NULL) will be returned, without
error, if the Channel contains no further Objects to be read.
- A null Object pointer will also be returned if this function
is invoked with the AST error status set, or if it should fail
for any reason.