ocssw
V2022
|
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "epr_api.h"
#include "epr_core.h"
#include "epr_field.h"
Go to the source code of this file.
Function Documentation
◆ epr_copy_field_elems_as_doubles()
epr_uint epr_copy_field_elems_as_doubles | ( | const EPR_SField * | field, |
double * | buffer, | ||
epr_uint | num_elems | ||
) |
Copies the data of the given field into the given buffer of double
elements. The actual number of elements copied is the minimum of the given number of elements (the buffer's size) and the actual number of elements contained in the field.
If the actual field data type is not double
the function automatically performs the conversion.
- Parameters
-
field the field from which to copy the elements buffer the buffer in which to copy the data num_elems the number of elements in the given buffer
- Returns
- the actual number of elements copied
Definition at line 657 of file epr_typconv.c.
◆ epr_copy_field_elems_as_floats()
epr_uint epr_copy_field_elems_as_floats | ( | const EPR_SField * | field, |
float * | buffer, | ||
epr_uint | num_elems | ||
) |
Copies the data of the given field into the given buffer of float
elements. The actual number of elements copied is the minimum of the given number of elements (the buffer's size) and the actual number of elements contained in the field.
If the actual field data type is not float
the function automatically performs the conversion.
- Parameters
-
field the field from which to copy the elements buffer the buffer in which to copy the data num_elems the number of elements in the given buffer
- Returns
- the actual number of elements copied
Definition at line 729 of file epr_typconv.c.
◆ epr_copy_field_elems_as_longs()
epr_uint epr_copy_field_elems_as_longs | ( | const EPR_SField * | field, |
int * | buffer, | ||
epr_uint | num_elems | ||
) |
Copies the data of the given field into the given buffer of int
elements. The actual number of elements copied is the minimum of the given number of elements (the buffer's size) and the actual number of elements contained in the field.
If the actual field data type is not int
the function automatically performs the conversion.
- Parameters
-
field the field from which to copy the elements buffer the buffer in which to copy the data num_elems the number of elements in the given buffer
- Returns
- the actual number of elements copied
Definition at line 797 of file epr_typconv.c.
◆ epr_copy_field_elems_as_uints()
epr_uint epr_copy_field_elems_as_uints | ( | const EPR_SField * | field, |
epr_uint * | buffer, | ||
epr_uint | num_elems | ||
) |
Copies the data of the given field into the given buffer of uint
elements. The actual number of elements copied is the minimum of the given number of elements (the buffer's size) and the actual number of elements contained in the field.
If the actual field data type is not uint
the function automatically performs the conversion.
- Parameters
-
field the field from which to copy the elements buffer the buffer in which to copy the data num_elems the number of elements in the given buffer
- Returns
- the actual number of elements copied
Definition at line 857 of file epr_typconv.c.
◆ epr_get_field_elem_as_char()
Interpretes a memory as a char
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
char
typed element orerror_code
if an error occured.
Definition at line 41 of file epr_typconv.c.
◆ epr_get_field_elem_as_double()
Interpretes a memory as a double
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
double
typed element orerror_code
if an error occured.
Definition at line 514 of file epr_typconv.c.
◆ epr_get_field_elem_as_float()
Interpretes a memory as a float
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
float
typed element orerror_code
if an error occured.
Definition at line 435 of file epr_typconv.c.
◆ epr_get_field_elem_as_int()
Interpretes a memory as a int
value.
If an error occurs the method returns 0
(zero). Whether an error really occured when zero is returned can by determined by using the epr_get_last_err_code
function.
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- a
int
value
Definition at line 291 of file epr_typconv.c.
◆ epr_get_field_elem_as_mjd()
Interpretes a memory data as a short
data
- Parameters
-
field the pointer at the array to convert time the pointer at the time structure to get
- Returns
- the time [days, seconds, microseconds] or
NULL
if an error occured.
Definition at line 596 of file epr_typconv.c.
◆ epr_get_field_elem_as_short()
Interpretes a memory as a short
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
short
typed element orerror_code
if an error occured.
Definition at line 155 of file epr_typconv.c.
◆ epr_get_field_elem_as_str()
Interpretes a memory data as a string.
- Parameters
-
field the pointer at the array to convert
- Returns
- the
char
typed element orNULL
if an error occured.
Definition at line 624 of file epr_typconv.c.
◆ epr_get_field_elem_as_uchar()
Interpretes a memory as a uchar
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
uchar
typed element orerror_code
if an error occured.
Definition at line 98 of file epr_typconv.c.
◆ epr_get_field_elem_as_uint()
Interpretes a memory as a uint
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
uint
typed element orerror_code
if an error occured.
Definition at line 363 of file epr_typconv.c.
◆ epr_get_field_elem_as_ushort()
epr_ushort epr_get_field_elem_as_ushort | ( | const EPR_SField * | field, |
epr_uint | elem_index | ||
) |
Interpretes a memory as a ushort
value
- Parameters
-
field the pointer at the array to convert elem_index the index of the element in the given array to convert
- Returns
- the
ushort
typed element orerror_code
if an error occured.
Definition at line 222 of file epr_typconv.c.
◆ epr_get_field_elems_char()
Interpretes a memory data as a char
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
char
typed element orNULL
if an error occured.
Definition at line 71 of file epr_typconv.c.
◆ epr_get_field_elems_double()
Interpretes a memory data as a double
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
double
typed element orNULL
if an error occured.
Definition at line 569 of file epr_typconv.c.
◆ epr_get_field_elems_float()
Interpretes a memory data as a float
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
float
typed element orNULL
if an error occured.
Definition at line 487 of file epr_typconv.c.
◆ epr_get_field_elems_int()
Interpretes a memory data as a int
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
int
typed element orNULL
if an error occured.
Definition at line 336 of file epr_typconv.c.
◆ epr_get_field_elems_short()
Interpretes a memory data as a short
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
short
typed element orNULL
if an error occured.
Definition at line 195 of file epr_typconv.c.
◆ epr_get_field_elems_uchar()
Interpretes a memory data as a uchar
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
uchar
typed element orNULL
if an error occured.
Definition at line 128 of file epr_typconv.c.
◆ epr_get_field_elems_uint()
Interpretes a memory data as a uint
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
uint
typed element orNULL
if an error occured.
Definition at line 408 of file epr_typconv.c.
◆ epr_get_field_elems_ushort()
const epr_ushort* epr_get_field_elems_ushort | ( | const EPR_SField * | field | ) |
Interpretes a memory data as a ushort
data
- Parameters
-
field the pointer at the array to convert
- Returns
- the
ushort
typed element orNULL
if an error occured.
Definition at line 261 of file epr_typconv.c.