OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
epr_typconv.c
Go to the documentation of this file.
1 /*
2  * $Id: epr_typconv.c,v 1.2 2009-03-27 10:25:54 sabine Exp $
3  *
4  * Copyright (C) 2002 by Brockmann Consult (info@brockmann-consult.de)
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation. This program is distributed in the hope it will
9  * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
10  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16  */
17 
18 #include <assert.h>
19 #include <errno.h>
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <string.h>
23 
24 #include "epr_api.h"
25 #include "epr_core.h"
26 #include "epr_field.h"
27 
28 /*********************************** TYPE CONVERSION ***********************************/
29 
30 
41 char epr_get_field_elem_as_char(const EPR_SField* field, epr_uint elem_index)
42 {
43  epr_clear_err();
44 
45  if (field == NULL) {
47  "epr_get_field_elem_as_char: invalid field name");
48  return (char)0;
49  }
50  if (elem_index >= field->info->num_elems) {
52  "epr_get_field_elem_as_char: invalid elem_index parameter");
53  return (char)0;
54  }
55  if (field->info->data_type_id != e_tid_char) {
57  "epr_get_field_elem_as_char: invalid type");
58  return (char)0;
59  }
60  return ((char*) field->elems)[elem_index];
61 }
62 
71 const char* epr_get_field_elems_char(const EPR_SField* field)
72 {
73  epr_clear_err();
74 
75  if (field == NULL) {
77  "epr_get_field_elems_as_chars: invalid field name");
78  return NULL;
79  }
80  if (field->info->data_type_id != e_tid_char) {
82  "epr_get_field_elems_as_chars: invalid type");
83  return NULL;
84  }
85  return (char*) field->elems;
86 }
87 
98 epr_uchar epr_get_field_elem_as_uchar(const EPR_SField* field, epr_uint elem_index)
99 {
100  epr_clear_err();
101 
102  if (field == NULL) {
104  "epr_get_field_elem_as_uchar: invalid field name");
105  return (epr_uchar)0;
106  }
107  if (elem_index >= field->info->num_elems) {
109  "epr_get_field_elem_as_uchar: invalid elem_index parameter");
110  return (epr_uchar)0;
111  }
112  if (field->info->data_type_id != e_tid_uchar) {
114  "epr_get_field_elem_as_uchar: invalid type");
115  return (epr_uchar)0;
116  }
117  return ((epr_uchar*) field->elems)[elem_index];
118 }
119 
128 const epr_uchar* epr_get_field_elems_uchar(const EPR_SField* field)
129 {
130  epr_clear_err();
131 
132  if (field == NULL) {
134  "epr_get_field_elems_as_uchars: invalid field name");
135  return NULL;
136  }
137  if (field->info->data_type_id != e_tid_uchar) {
139  "epr_get_field_elems_as_uchars: invalid type");
140  return NULL;
141  }
142  return (epr_uchar*) field->elems;
143 }
144 
155 short epr_get_field_elem_as_short(const EPR_SField* field, epr_uint elem_index)
156 {
157  epr_clear_err();
158 
159  if (field == NULL) {
161  "epr_get_field_elem_as_short: invalid field name");
162  return (short)0;
163  }
164  if (elem_index >= field->info->num_elems) {
166  "epr_get_field_elem_as_short: invalid elem_index parameter");
167  return (short)0;
168  }
169 
170 
171  if (field->info->data_type_id == e_tid_uchar) {
172  return (short)((epr_uchar*) field->elems)[elem_index];
173  }
174  if (field->info->data_type_id == e_tid_char) {
175  return (short)((char*) field->elems)[elem_index];
176  }
177  if (field->info->data_type_id == e_tid_short) {
178  return (short)((short*) field->elems)[elem_index];
179  }
180 
182  "epr_get_field_elem_as_short: invalid type");
183 
184  return (short)0;
185 }
186 
195 const short* epr_get_field_elems_short(const EPR_SField* field)
196 {
197  epr_clear_err();
198 
199  if (field == NULL) {
201  "epr_get_field_elems_as_shorts: invalid field name");
202  return NULL;
203  }
204  if (field->info->data_type_id != e_tid_short) {
206  "epr_get_field_elems_as_shorts: invalid type");
207  return NULL;
208  }
209  return (short*) field->elems;
210 }
211 
222 epr_ushort epr_get_field_elem_as_ushort(const EPR_SField* field, epr_uint elem_index)
223 {
224  epr_clear_err();
225 
226  if (field == NULL) {
228  "epr_get_field_elem_as_ushort: invalid field name");
229  return (epr_ushort)0;
230  }
231  if (elem_index >= field->info->num_elems) {
233  "epr_get_field_elem_as_ushort: invalid elem_index parameter");
234  return (epr_ushort)0;
235  }
236 
237  if (field->info->data_type_id == e_tid_uchar) {
238  return (epr_ushort)((epr_uchar*) field->elems)[elem_index];
239  }
240  if (field->info->data_type_id == e_tid_char) {
241  return (epr_ushort)((char*) field->elems)[elem_index];
242  }
243  if (field->info->data_type_id == e_tid_ushort) {
244  return (epr_ushort)((epr_ushort*) field->elems)[elem_index];
245  }
246 
248  "epr_get_field_elem_as_ushort: invalid type");
249 
250  return (epr_ushort)0;
251 }
252 
261 const epr_ushort* epr_get_field_elems_ushort(const EPR_SField* field)
262 {
263  epr_clear_err();
264 
265  if (field == NULL) {
267  "epr_get_field_elems_as_ushorts: invalid field name");
268  return NULL;
269  }
270  if (field->info->data_type_id != e_tid_ushort) {
272  "epr_get_field_elems_as_ushorts: invalid type");
273  return NULL;
274  }
275  return (epr_ushort*) field->elems;
276 }
277 
291 int epr_get_field_elem_as_int(const EPR_SField* field, epr_uint elem_index)
292 {
293  epr_clear_err();
294 
295  if (field == NULL) {
297  "epr_get_field_elem_as_long: invalid field name");
298  return (int)0;
299  }
300  if (elem_index >= field->info->num_elems) {
302  "epr_get_field_elem_as_long: invalid elem_index parameter");
303  return (int)0;
304  }
305 
306  if (field->info->data_type_id == e_tid_uchar) {
307  return (int)((epr_uchar*) field->elems)[elem_index];
308  }
309  if (field->info->data_type_id == e_tid_char) {
310  return (int)((char*) field->elems)[elem_index];
311  }
312  if (field->info->data_type_id == e_tid_ushort) {
313  return (int)((epr_ushort*) field->elems)[elem_index];
314  }
315  if (field->info->data_type_id == e_tid_short) {
316  return (int)((short*) field->elems)[elem_index];
317  }
318  if (field->info->data_type_id == e_tid_int) {
319  return (int)((int*) field->elems)[elem_index];
320  }
321 
323  "epr_get_field_elem_as_long: invalid type");
324 
325  return (int)0;
326 }
327 
336 const int* epr_get_field_elems_int(const EPR_SField* field)
337 {
338  epr_clear_err();
339 
340  if (field == NULL) {
342  "epr_get_field_elems_as_longs: invalid field name");
343  return NULL;
344  }
345  if (field->info->data_type_id != e_tid_int) {
347  "epr_get_field_elems_as_longs: invalid type");
348  return NULL;
349  }
350  return (int*) field->elems;
351 }
352 
363 epr_uint epr_get_field_elem_as_uint(const EPR_SField* field, epr_uint elem_index)
364 {
365  epr_clear_err();
366 
367  if (field == NULL) {
369  "epr_get_field_elem_as_uint: invalid field name");
370  return (epr_uint)0;
371  }
372  if (elem_index >= field->info->num_elems) {
374  "epr_get_field_elem_as_uint: invalid elem_index parameter");
375  return (epr_uint)0;
376  }
377 
378  if (field->info->data_type_id == e_tid_uint) {
379  return (epr_uint)((epr_uint*) field->elems)[elem_index];
380  }
381  if (field->info->data_type_id == e_tid_uchar) {
382  return (epr_uint)((epr_uchar*) field->elems)[elem_index];
383  }
384  if (field->info->data_type_id == e_tid_char) {
385  return (epr_uint)((char*) field->elems)[elem_index];
386  }
387  if (field->info->data_type_id == e_tid_ushort) {
388  return (epr_uint)((epr_ushort*) field->elems)[elem_index];
389  }
390  if (field->info->data_type_id == e_tid_short) {
391  return (epr_uint)((short*) field->elems)[elem_index];
392  }
393 
395  "epr_get_field_elem_as_uint: invalid type");
396 
397  return (epr_uint)0;
398 }
399 
408 const epr_uint* epr_get_field_elems_uint(const EPR_SField* field)
409 {
410  epr_clear_err();
411 
412  if (field == NULL) {
414  "epr_get_field_elems_as_uints: invalid field name");
415  return NULL;
416  }
417  if (field->info->data_type_id != e_tid_uint) {
419  "epr_get_field_elems_as_uints: invalid type");
420  return NULL;
421  }
422  return (epr_uint*) field->elems;
423 }
424 
435 float epr_get_field_elem_as_float(const EPR_SField* field, epr_uint elem_index)
436 {
437  epr_clear_err();
438 
439  if (field == NULL) {
441  "epr_get_field_elem_as_float: invalid field name");
442  return 0.0;
443 
444  }
445  if (elem_index >= field->info->num_elems) {
447  "epr_get_field_elem_as_float: invalid elem_index parameter");
448  return 0.0;
449  }
450 
451  if (field->info->data_type_id == e_tid_float) {
452  return (float)((float*) field->elems)[elem_index];
453  }
454  if (field->info->data_type_id == e_tid_uchar) {
455  return (float)((epr_uchar*) field->elems)[elem_index];
456  }
457  if (field->info->data_type_id == e_tid_char) {
458  return (float)((char*) field->elems)[elem_index];
459  }
460  if (field->info->data_type_id == e_tid_ushort) {
461  return (float)((epr_ushort*) field->elems)[elem_index];
462  }
463  if (field->info->data_type_id == e_tid_short) {
464  return (float)((short*) field->elems)[elem_index];
465  }
466  if (field->info->data_type_id == e_tid_uint) {
467  return (float)((epr_uint*) field->elems)[elem_index];
468  }
469  if (field->info->data_type_id == e_tid_int) {
470  return (float)((int*) field->elems)[elem_index];
471  }
472 
474  "epr_get_field_elems_as_float: invalid type");
475 
476  return 0.0;
477 }
478 
487 const float* epr_get_field_elems_float(const EPR_SField* field)
488 {
489  epr_clear_err();
490 
491  if (field == NULL) {
493  "epr_get_field_elem_as_floats: invalid field name");
494  return NULL;
495  }
496  if (field->info->data_type_id != e_tid_float) {
498  "epr_get_field_elems_as_floats: invalid type");
499  return NULL;
500  }
501  return (float*) field->elems;
502 }
503 
514 double epr_get_field_elem_as_double(const EPR_SField* field, epr_uint elem_index)
515 {
516  epr_clear_err();
517 
518  if (field == NULL) {
520  "epr_get_field_elems_as_double: invalid field name");
521  return 0.0;
522 
523  }
524  if (elem_index >= field->info->num_elems) {
526  "epr_get_field_elems_as_double: invalid elem_index parameter");
527  return 0.0;
528  }
529 
530  if (field->info->data_type_id == e_tid_double) {
531  return (double)((double*) field->elems)[elem_index];
532  }
533  if (field->info->data_type_id == e_tid_float) {
534  return (double)((float*) field->elems)[elem_index];
535  }
536  if (field->info->data_type_id == e_tid_uchar) {
537  return (double)((epr_uchar*) field->elems)[elem_index];
538  }
539  if (field->info->data_type_id == e_tid_char) {
540  return (double)((char*) field->elems)[elem_index];
541  }
542  if (field->info->data_type_id == e_tid_ushort) {
543  return (double)((epr_ushort*) field->elems)[elem_index];
544  }
545  if (field->info->data_type_id == e_tid_short) {
546  return (double)((short*) field->elems)[elem_index];
547  }
548  if (field->info->data_type_id == e_tid_uint) {
549  return (double)((epr_uint*) field->elems)[elem_index];
550  }
551  if (field->info->data_type_id == e_tid_int) {
552  return (double)((int*) field->elems)[elem_index];
553  }
554 
556  "epr_get_field_elems_as_double: invalid type");
557 
558  return 0.0;
559 }
560 
569 const double* epr_get_field_elems_double(const EPR_SField* field)
570 {
571  epr_clear_err();
572 
573  epr_clear_err();
574  if (field == NULL) {
576  "epr_get_field_elems_as_doubles: invalid field name");
577  return NULL;
578  }
579  if (field->info->data_type_id != e_tid_double) {
581  "epr_get_field_elems_as_doubles: invalid type");
582  return NULL;
583  }
584  return (double*) field->elems;
585 }
586 
596 const EPR_STime* epr_get_field_elem_as_mjd(const EPR_SField* field)
597 {
598  epr_clear_err();
599 
600  if (field == NULL) {
602  "epr_get_field_elem_as_mjd: invalid field name");
603  return NULL;
604 
605  }
606 
607  if (field->info->data_type_id != e_tid_time) {
609  "epr_get_field_elem_as_mjd: invalid type");
610  return NULL;
611  }
612 
613  return (const EPR_STime*) field->elems;
614 }
615 
624 const char* epr_get_field_elem_as_str(const EPR_SField* field)
625 {
626  epr_clear_err();
627 
628  if (field == NULL) {
630  "epr_get_field_elem_as_str: invalid field name");
631  return NULL;
632  }
633  if (field->info->data_type_id != e_tid_string) {
635  "epr_get_field_elem_as_str: invalid type");
636  return NULL;
637  }
638  return (const char*) field->elems;
639 }
640 
641 
642 
643 
657 epr_uint epr_copy_field_elems_as_doubles(const EPR_SField* field, double* buffer, epr_uint num_elems)
658 {
659  epr_uint num_elems_min = 0;
660  epr_uint i;
661 
662  epr_clear_err();
663 
664  if (field == NULL) {
666  "epr_get_field_elems_as_doubles: invalid field name");
667  return num_elems_min;
668  }
669 
670  num_elems_min = num_elems;
671  if (field->info->num_elems < num_elems_min) {
672  num_elems_min = field->info->num_elems;
673  }
674 
675  if (field->info->data_type_id == e_tid_uchar) {
676  for (i = 0; i < num_elems_min; i++) {
677  buffer[i] = (double)((epr_uchar*) field->elems)[i];
678  }
679  } else if (field->info->data_type_id == e_tid_char) {
680  for (i = 0; i < num_elems_min; i++) {
681  buffer[i] = (double)((char*) field->elems)[i];
682  }
683  } else if (field->info->data_type_id == e_tid_ushort) {
684  for (i = 0; i < num_elems_min; i++) {
685  buffer[i] = (double)((epr_ushort*) field->elems)[i];
686  }
687  } else if (field->info->data_type_id == e_tid_short) {
688  for (i = 0; i < num_elems_min; i++) {
689  buffer[i] = (double)((short*) field->elems)[i];
690  }
691  } else if (field->info->data_type_id == e_tid_uint) {
692  for (i = 0; i < num_elems_min; i++) {
693  buffer[i] = (double)((epr_uint*) field->elems)[i];
694  }
695  } else if (field->info->data_type_id == e_tid_int) {
696  for (i = 0; i < num_elems_min; i++) {
697  buffer[i] = (double)((int*) field->elems)[i];
698  }
699  } else if (field->info->data_type_id == e_tid_float) {
700  for (i = 0; i < num_elems_min; i++) {
701  buffer[i] = (double)((float*) field->elems)[i];
702  }
703  } else if (field->info->data_type_id == e_tid_double) {
704  for (i = 0; i < num_elems_min; i++) {
705  buffer[i] = (double)((double*) field->elems)[i];
706  }
707  } else {
709  "epr_get_field_elems_as_double: invalid type");
710  return 0;
711  }
712 
713  return num_elems_min;
714 }
715 
729 epr_uint epr_copy_field_elems_as_floats(const EPR_SField* field, float* buffer, epr_uint num_elems)
730 {
731  epr_uint num_elems_min = 0;
732  epr_uint i;
733 
734  epr_clear_err();
735 
736  if (field == NULL) {
738  "epr_copy_field_elems_as_floats: invalid field name");
739  return num_elems_min;
740  }
741 
742  num_elems_min = num_elems;
743  if (field->info->num_elems < num_elems_min) {
744  num_elems_min = field->info->num_elems;
745  }
746 
747  if (field->info->data_type_id == e_tid_uchar) {
748  for (i = 0; i < num_elems_min; i++) {
749  buffer[i] = (float)((epr_uchar*) field->elems)[i];
750  }
751  } else if (field->info->data_type_id == e_tid_char) {
752  for (i = 0; i < num_elems_min; i++) {
753  buffer[i] = (float)((char*) field->elems)[i];
754  }
755  } else if (field->info->data_type_id == e_tid_ushort) {
756  for (i = 0; i < num_elems_min; i++) {
757  buffer[i] = (float)((epr_ushort*) field->elems)[i];
758  }
759  } else if (field->info->data_type_id == e_tid_short) {
760  for (i = 0; i < num_elems_min; i++) {
761  buffer[i] = (float)((short*) field->elems)[i];
762  }
763  } else if (field->info->data_type_id == e_tid_uint) {
764  for (i = 0; i < num_elems_min; i++) {
765  buffer[i] = (float)((epr_uint*) field->elems)[i];
766  }
767  } else if (field->info->data_type_id == e_tid_int) {
768  for (i = 0; i < num_elems_min; i++) {
769  buffer[i] = (float)((int*) field->elems)[i];
770  }
771  } else if (field->info->data_type_id == e_tid_float) {
772  for (i = 0; i < num_elems_min; i++) {
773  buffer[i] = (float)((float*) field->elems)[i];
774  }
775  } else {
777  "epr_copy_field_elems_as_floats: invalid type");
778  return 0;
779  }
780 
781  return num_elems_min;
782 }
783 
797 epr_uint epr_copy_field_elems_as_longs(const EPR_SField* field, int* buffer, epr_uint num_elems)
798 {
799  epr_uint num_elems_min = 0;
800  epr_uint i;
801 
802  epr_clear_err();
803 
804  if (field == NULL) {
806  "epr_copy_field_elems_as_longs: invalid field name");
807  return num_elems_min;
808  }
809 
810  num_elems_min = num_elems;
811  if (field->info->num_elems < num_elems_min) {
812  num_elems_min = field->info->num_elems;
813  }
814 
815  if (field->info->data_type_id == e_tid_uchar) {
816  for (i = 0; i < num_elems_min; i++) {
817  buffer[i] = (int)((epr_uchar*) field->elems)[i];
818  }
819  } else if (field->info->data_type_id == e_tid_char) {
820  for (i = 0; i < num_elems_min; i++) {
821  buffer[i] = (int)((char*) field->elems)[i];
822  }
823  } else if (field->info->data_type_id == e_tid_ushort) {
824  for (i = 0; i < num_elems_min; i++) {
825  buffer[i] = (int)((epr_ushort*) field->elems)[i];
826  }
827  } else if (field->info->data_type_id == e_tid_short) {
828  for (i = 0; i < num_elems_min; i++) {
829  buffer[i] = (int)((short*) field->elems)[i];
830  }
831  } else if (field->info->data_type_id == e_tid_int) {
832  for (i = 0; i < num_elems_min; i++) {
833  buffer[i] = (int)((int*) field->elems)[i];
834  }
835  } else {
837  "epr_copy_field_elems_as_longs: invalid type");
838  return 0;
839  }
840 
841  return num_elems_min;
842 }
843 
857 epr_uint epr_copy_field_elems_as_uints(const EPR_SField* field, epr_uint* buffer, epr_uint num_elems)
858 {
859  epr_uint num_elems_min = 0;
860  epr_uint i;
861 
862  epr_clear_err();
863 
864  if (field == NULL) {
866  "epr_copy_field_elems_as_uints: invalid field name");
867  return num_elems_min;
868  }
869 
870  num_elems_min = num_elems;
871  if (field->info->num_elems < num_elems_min) {
872  num_elems_min = field->info->num_elems;
873  }
874 
875  if (field->info->data_type_id == e_tid_uchar) {
876  for (i = 0; i < num_elems_min; i++) {
877  buffer[i] = (epr_uint)((epr_uchar*) field->elems)[i];
878  }
879  } else if (field->info->data_type_id == e_tid_char) {
880  for (i = 0; i < num_elems_min; i++) {
881  buffer[i] = (epr_uint)((char*) field->elems)[i];
882  }
883  } else if (field->info->data_type_id == e_tid_ushort) {
884  for (i = 0; i < num_elems_min; i++) {
885  buffer[i] = (epr_uint)((epr_ushort*) field->elems)[i];
886  }
887  } else if (field->info->data_type_id == e_tid_short) {
888  for (i = 0; i < num_elems_min; i++) {
889  buffer[i] = (epr_uint)((short*) field->elems)[i];
890  }
891  } else if (field->info->data_type_id == e_tid_int) {
892  for (i = 0; i < num_elems_min; i++) {
893  buffer[i] = (epr_uint)((epr_uint*) field->elems)[i];
894  }
895  } else {
897  "epr_copy_field_elems_as_uints: invalid type");
898  return 0;
899  }
900 
901  return num_elems_min;
902 }
903 /***************************************************************************************/
@ e_err_invalid_field_name
Definition: epr_api.h:103
const int * epr_get_field_elems_int(const EPR_SField *field)
Definition: epr_typconv.c:336
unsigned int epr_uint
Definition: epr_api.h:188
float epr_get_field_elem_as_float(const EPR_SField *field, epr_uint elem_index)
Definition: epr_typconv.c:435
unsigned short epr_ushort
Definition: epr_api.h:187
#define NULL
Definition: decode_rs.h:63
epr_uchar epr_get_field_elem_as_uchar(const EPR_SField *field, epr_uint elem_index)
Definition: epr_typconv.c:98
const double * epr_get_field_elems_double(const EPR_SField *field)
Definition: epr_typconv.c:569
const char * epr_get_field_elems_char(const EPR_SField *field)
Definition: epr_typconv.c:71
@ e_tid_float
Definition: epr_api.h:60
epr_uint epr_copy_field_elems_as_longs(const EPR_SField *field, int *buffer, epr_uint num_elems)
Definition: epr_typconv.c:797
@ e_err_invalid_data_format
Definition: epr_api.h:107
epr_ushort epr_get_field_elem_as_ushort(const EPR_SField *field, epr_uint elem_index)
Definition: epr_typconv.c:222
char epr_get_field_elem_as_char(const EPR_SField *field, epr_uint elem_index)
Definition: epr_typconv.c:41
const epr_ushort * epr_get_field_elems_ushort(const EPR_SField *field)
Definition: epr_typconv.c:261
@ e_tid_int
Definition: epr_api.h:58
@ e_tid_ushort
Definition: epr_api.h:52
const epr_uchar * epr_get_field_elems_uchar(const EPR_SField *field)
Definition: epr_typconv.c:128
int epr_get_field_elem_as_int(const EPR_SField *field, epr_uint elem_index)
Definition: epr_typconv.c:291
const EPR_STime * epr_get_field_elem_as_mjd(const EPR_SField *field)
Definition: epr_typconv.c:596
@ e_err_invalid_value
Definition: epr_api.h:108
@ e_tid_uint
Definition: epr_api.h:56
const epr_uint * epr_get_field_elems_uint(const EPR_SField *field)
Definition: epr_typconv.c:408
integer, parameter double
@ e_tid_char
Definition: epr_api.h:50
void epr_clear_err()
Definition: epr_core.c:247
void epr_set_err(EPR_EErrCode err_code, const char *err_message)
Definition: epr_core.c:221
@ e_tid_double
Definition: epr_api.h:62
const char * epr_get_field_elem_as_str(const EPR_SField *field)
Definition: epr_typconv.c:624
const float * epr_get_field_elems_float(const EPR_SField *field)
Definition: epr_typconv.c:487
@ e_tid_string
Definition: epr_api.h:64
@ e_tid_short
Definition: epr_api.h:54
const short * epr_get_field_elems_short(const EPR_SField *field)
Definition: epr_typconv.c:195
@ e_tid_time
Definition: epr_api.h:68
unsigned char epr_uchar
Definition: epr_api.h:186
@ e_tid_uchar
Definition: epr_api.h:48
short epr_get_field_elem_as_short(const EPR_SField *field, epr_uint elem_index)
Definition: epr_typconv.c:155
int i
Definition: decode_rs.h:71
epr_uint epr_copy_field_elems_as_uints(const EPR_SField *field, epr_uint *buffer, epr_uint num_elems)
Definition: epr_typconv.c:857
epr_uint epr_get_field_elem_as_uint(const EPR_SField *field, epr_uint elem_index)
Definition: epr_typconv.c:363
epr_uint epr_copy_field_elems_as_doubles(const EPR_SField *field, double *buffer, epr_uint num_elems)
Definition: epr_typconv.c:657
double epr_get_field_elem_as_double(const EPR_SField *field, epr_uint elem_index)
Definition: epr_typconv.c:514
epr_uint epr_copy_field_elems_as_floats(const EPR_SField *field, float *buffer, epr_uint num_elems)
Definition: epr_typconv.c:729