|
RocketLogger
2.0.0
|
Include dependency graph for rl_socket.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| int | rl_socket_init (void) |
| int | rl_socket_deinit (void) |
| int | rl_socket_metadata (rl_config_t const *const config) |
| int | rl_socket_handle_data (int32_t const *analog_buffer, uint32_t const *digital_buffer, int32_t const *ambient_buffer, size_t buffer_size, size_t ambient_buffer_size, rl_timestamp_t const *const timestamp_realtime, rl_timestamp_t const *const timestamp_monotonic, rl_config_t const *const config) |
| int rl_socket_deinit | ( | void | ) |
Deinitialize the data streaming socket.
Definition at line 71 of file rl_socket.c.
References SUCCESS, zmq_data_context, and zmq_data_socket.
| int rl_socket_handle_data | ( | int32_t const * | analog_buffer, |
| uint32_t const * | digital_buffer, | ||
| int32_t const * | ambient_buffer, | ||
| size_t | buffer_size, | ||
| size_t | ambient_buffer_size, | ||
| rl_timestamp_t const *const | timestamp_realtime, | ||
| rl_timestamp_t const *const | timestamp_monotonic, | ||
| rl_config_t const *const | config | ||
| ) |
Process the data buffer for publishing to data socket.
| analog_buffer | Analog data buffer to process |
| digital_buffer | Digital data buffer to process |
| ambient_buffer | Ambient sensor data buffer to process |
| buffer_size | Number of data samples in the buffer |
| ambient_buffer_size | Number of sensor samples in the buffer |
| timestamp_realtime | Timestamp sampled from realtime clock |
| timestamp_monotonic | Timestamp sampled from monotonic clock |
| config | Current measurement configuration |
Definition at line 144 of file rl_socket.c.
References rl_config::ambient_enable, rl_config::channel_enable, ERROR, metadata_json, RL_CHANNEL_COUNT, rl_log(), RL_LOG_ERROR, rl_status::sensor_count, SUCCESS, and zmq_data_socket.
Referenced by pru_sample().
Here is the call graph for this function:| int rl_socket_init | ( | void | ) |
Copyright (c) 2016-2020, ETH Zurich, Computer Engineering Group 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. Initialize socket for data streaming.
Definition at line 56 of file rl_socket.c.
References ERROR, rl_log(), RL_LOG_ERROR, RL_ZMQ_DATA_SOCKET, SUCCESS, zmq_data_context, and zmq_data_socket.
Here is the call graph for this function:| int rl_socket_metadata | ( | rl_config_t const *const | config | ) |
Initialize metadata for data socket.
| config | Current measurement configuration |
Definition at line 82 of file rl_socket.c.
References rl_config::ambient_enable, rl_config::channel_enable, rl_config::digital_enable, is_current(), is_low_current(), is_voltage(), metadata_json, RL_CHANNEL_COUNT, RL_CHANNEL_DIGITAL_COUNT, RL_CHANNEL_NAMES, RL_SOCKET_METADATA_SIZE, rl_unit_to_string(), rl_config::sample_rate, rl_status::sensor_available, SENSOR_REGISTRY, SENSOR_REGISTRY_SIZE, snprintfcat(), and SUCCESS.
Here is the call graph for this function: