NCEPLIBS-bufr
12.1.0
|
C language interface for reading or writing BUFR messages. More...
#include "bufrlib.h"
Go to the source code of this file.
Macros | |
#define | MXFNLEN 200 |
Maximum length of a filename, including any directory prefixes or other local filesystem notation. More... | |
Functions | |
void | ccbfl (void) |
Close all files that were opened via previous calls to function cobfl(). More... | |
void | cobfl (char *bfl, char io) |
Open a new file for reading or writing BUFR messages via a C language interface. More... | |
void | crbmg (char *bmg, int mxmb, int *nmb, int *iret) |
Read the next BUFR message from the file that was opened via the most recent call to function cobfl() with io = 'r'. More... | |
void | cwbmg (char *bmg, int nmb, int *iret) |
Write a BUFR message to the file that was opened via the most recent call to function cobfl() with io = 'w'. More... | |
int | rbytes (char *bmg, int mxmb, int isloc, int newbytes) |
Read a specified number of bytes from the file that was opened via the most recent call to function cobfl() with io = 'r'. More... | |
Variables | |
FILE * | pbf [2] |
File pointers; each element will automatically initialize to NULL. More... | |
C language interface for reading or writing BUFR messages.
Definition in file crwbmg.c.
#define MXFNLEN 200 |
void ccbfl | ( | void | ) |
void cobfl | ( | char * | bfl, |
char | io | ||
) |
Open a new file for reading or writing BUFR messages via a C language interface.
This function is designed to be easily callable from application program written in either C or Fortran. It is functionally equivalent to subroutine openbf(); however, there are some important differences:
Any errors encountered when using this function are automatically logged to standard output, or to an alternate location previously specified via a call to subroutine errwrt().
bfl | - System file to be opened. Inclusion of directory prefixes or other local filesystem notation is allowed, up to 200 total characters. |
io | - Flag indicating how bfl is to be opened:
|
Definition at line 120 of file crwbmg.c.
References bort_f(), MXFNLEN, and pbf.
Referenced by main().
void crbmg | ( | char * | bmg, |
int | mxmb, | ||
int * | nmb, | ||
int * | iret | ||
) |
Read the next BUFR message from the file that was opened via the most recent call to function cobfl() with io = 'r'.
This function is designed to be easily callable from application program written in either C or Fortran.
bmg | - BUFR message |
mxmb | - Number of elements in bmg array;; used by the function to ensure that it doesn't overflow the array. |
nmb | - Size (in bytes) of BUFR message in bmg. |
iret | - return code:
|
Definition at line 195 of file crwbmg.c.
References bort_f(), iupbs01_f(), pbf, and rbytes().
void cwbmg | ( | char * | bmg, |
int | nmb, | ||
int * | iret | ||
) |
Write a BUFR message to the file that was opened via the most recent call to function cobfl() with io = 'w'.
This function is designed to be easily callable from application program written in either C or Fortran.
bmg | - BUFR message |
nmb | - Size (in bytes) of BUFR message in bmg |
iret | - return code:
|
int rbytes | ( | char * | bmg, |
int | mxmb, | ||
int | isloc, | ||
int | newbytes | ||
) |
Read a specified number of bytes from the file that was opened via the most recent call to function cobfl() with io = 'r'.
bmg | - Array containing the newbytes bytes that were read, beginning at byte number isloc. |
mxmb | - Number of elements in bmg array; used by the function to ensure that it doesn't overflow the array. |
isloc | - Starting byte within bmg into which to read the next newbytes bytes |
newbytes | - Number of bytes to read from file most recently opened for input/reading via function cobfl() |
Definition at line 38 of file crwbmg.c.
References pbf.
Referenced by crbmg().