|
RocketLogger
1.1.4
|
#include "rl_util.h"
Include dependency graph for lib_util.c:Go to the source code of this file.
Macros | |
| #define | NUMBER_SAMPLE_RATES 10 |
| Number of possible sampling rates. More... | |
| #define | NUMBER_UPDATE_RATES 4 |
| Number of possible update rates. More... | |
Functions | |
| int | check_sample_rate (int sample_rate) |
| int | check_update_rate (int update_rate) |
| pid_t | get_pid (void) |
| int | set_pid (pid_t pid) |
Variables | |
| int | possible_sample_rates [NUMBER_SAMPLE_RATES] |
| Possible sampling rates. More... | |
| int | possible_update_rates [NUMBER_UPDATE_RATES] = {1, 2, 5, 10} |
| Possible update rates. More... | |
| #define NUMBER_SAMPLE_RATES 10 |
Number of possible sampling rates.
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:
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 35 of file lib_util.c.
Referenced by check_sample_rate().
| #define NUMBER_UPDATE_RATES 4 |
Number of possible update rates.
Definition at line 41 of file lib_util.c.
Referenced by check_update_rate().
| int check_sample_rate | ( | int | sample_rate | ) |
Check if provided sampling rate is possible
| sample_rate | Sampling rate |
Definition at line 50 of file lib_util.c.
References FAILURE, NUMBER_SAMPLE_RATES, possible_sample_rates, and SUCCESS.
Referenced by parse_args(), and rl_start().
| int check_update_rate | ( | int | update_rate | ) |
Check if provided update rate is possible
| update_rate | Update rate |
Definition at line 64 of file lib_util.c.
References FAILURE, NUMBER_UPDATE_RATES, possible_update_rates, and SUCCESS.
Referenced by parse_args(), and rl_start().
| pid_t get_pid | ( | void | ) |
Get process ID (PID) of background sampling process
Definition at line 77 of file lib_util.c.
References FAILURE, and PID_FILE.
Referenced by rl_get_status(), rl_read_status(), and rl_stop().
| int set_pid | ( | pid_t | pid | ) |
Store process ID (PID)
| pid | Own PID |
Definition at line 100 of file lib_util.c.
References ERROR, FAILURE, PID_FILE, rl_log(), and SUCCESS.
Referenced by rl_start().
Here is the call graph for this function:| int possible_sample_rates[NUMBER_SAMPLE_RATES] |
Possible sampling rates.
Definition at line 37 of file lib_util.c.
Referenced by check_sample_rate().
| int possible_update_rates[NUMBER_UPDATE_RATES] = {1, 2, 5, 10} |