RocketLogger  1.1.4
ambient.h File Reference
#include <stdint.h>
#include "log.h"
#include "rl_file.h"
#include "types.h"
#include "util.h"
+ Include dependency graph for ambient.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AMBIENT_SAMPLING_RATE   1
 
#define AMBIENT_DATA_BLOCK_SIZE   1
 

Functions

void ambient_store_data (FILE *ambient_file, struct time_stamp *timestamp_realtime, struct time_stamp *timestamp_monotonic, struct rl_conf *conf)
 
void ambient_set_file_name (struct rl_conf *conf)
 
void ambient_setup_lead_in (struct rl_file_lead_in *lead_in, struct rl_conf *conf)
 
void ambient_setup_channels (struct rl_file_header *file_header, struct rl_conf *conf)
 
void ambient_setup_header (struct rl_file_header *file_header, struct rl_conf *conf, char *comment)
 

Macro Definition Documentation

#define AMBIENT_DATA_BLOCK_SIZE   1

Definition at line 43 of file ambient.h.

Referenced by ambient_setup_lead_in(), and pru_sample().

#define AMBIENT_SAMPLING_RATE   1

Copyright (c) 2016-2018, Swiss Federal Institute of Technology (ETH Zurich) All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition at line 42 of file ambient.h.

Referenced by ambient_setup_lead_in().

Function Documentation

void ambient_set_file_name ( struct rl_conf conf)

Definition at line 78 of file ambient.c.

References rl_conf::ambient, rl_ambient::file_name, rl_conf::file_name, and MAX_PATH_LENGTH.

Referenced by parse_args().

void ambient_setup_header ( struct rl_file_header file_header,
struct rl_conf conf,
char *  comment 
)

Definition at line 160 of file ambient.c.

References ambient_setup_channels(), and rl_file_header::comment.

Referenced by pru_sample().

+ Here is the call graph for this function:

void ambient_store_data ( FILE *  ambient_file,
struct time_stamp timestamp_realtime,
struct time_stamp timestamp_monotonic,
struct rl_conf conf 
)

Copyright (c) 2016-2018, Swiss Federal Institute of Technology (ETH Zurich) All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Handle a ambient data buffer, dependent on current configuration

Parameters
ambient_fileFile pointer to ambient file
timestamp_realtimetime_stamp with realtime clock value
timestamp_monotonictime_stamp with monotonic clock value
confCurrent rl_conf configuration.

Definition at line 43 of file ambient.c.

References rl_conf::ambient, rl_ambient::available_sensors, rl_sensor::getValue, rl_sensor::identifier, rl_sensor::read, rl_ambient::sensor_count, sensor_registry, and SENSOR_REGISTRY_SIZE.

Referenced by pru_sample().