json2carmen.c
Go to the documentation of this file.
1 #include "../csm/csm_all.h"
2 
3 int main(int argc, char * argv[]) {
4  sm_set_program_name(argv[0]);
5 
6  LDP ld; int count=0, errors=0;
7  while((ld = ld_read_smart(stdin))) {
8  if(!ld_valid_fields(ld)) {
9  sm_error("Invalid laser data (#%d in file)\n", count);
10  errors++;
11  continue;
12  }
13 
14  ld_write_as_carmen(ld, stdout);
15 
16  ld_free(ld);
17  count++;
18  }
19 
20  return errors;
21 }
void sm_set_program_name(const char *name)
Definition: logging.c:21
int ld_valid_fields(LDP ld)
Definition: laser_data.c:179
void ld_write_as_carmen(LDP ld, FILE *stream)
LDP ld_read_smart(FILE *)
void ld_free(LDP ld)
Definition: laser_data.c:87
int main(int argc, char *argv[])
Definition: json2carmen.c:3
void sm_error(const char *msg,...)
Definition: logging.c:49


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23