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

Go to the source code of this file.

Data Structures

struct  rl_file_lead_in
 
struct  rl_file_channel
 
struct  rl_file_header
 

Macros

#define RL_SCALE_PICO   -12
 
#define RL_SCALE_TEN_PICO   -11
 
#define RL_SCALE_NANO   -9
 
#define RL_SCALE_TEN_NANO   -8
 
#define RL_SCALE_MICRO   -6
 
#define RL_SCALE_MILLI   -3
 
#define RL_SCALE_NONE   0
 
#define RL_SCALE_KILO   3
 
#define RL_SCALE_MEGA   6
 
#define RL_SCALE_GIGA   9
 
#define RL_SCALE_TERA   12
 
#define RL_FILE_MAGIC   0x444C5225
 File header magic number (ascii RLD) More...
 
#define RL_FILE_VERSION   0x03
 File format version of current implementation. More...
 
#define RL_FILE_CHANNEL_NAME_LENGTH   16
 Maximum channel description length. More...
 
#define NO_VALID_DATA   0xFFFF
 No additional range valid information available. More...
 
#define RL_FILE_COMMENT   "This is a comment"
 Comment for file header. More...
 
#define RL_FILE_COMMENT_ALIGNMENT_BYTES   sizeof(uint32_t)
 Comment alignment in bytes. More...
 

Typedefs

typedef enum unit rl_unit
 

Enumerations

enum  unit {
  RL_UNIT_UNITLESS = 0, RL_UNIT_VOLT = 1, RL_UNIT_AMPERE = 2, RL_UNIT_BINARY = 3,
  RL_UNIT_RANGE_VALID = 4, RL_UNIT_LUX = 5, RL_UNIT_DEG_C = 6, RL_UNIT_INTEGER = 7,
  RL_UNIT_PERCENT = 8, RL_UNIT_PASCAL = 9, RL_UNIT_UNDEFINED = 0xffffffff
}
 

Macro Definition Documentation

#define NO_VALID_DATA   0xFFFF

No additional range valid information available.

Definition at line 69 of file rl_file.h.

Referenced by ambient_setup_channels(), and file_setup_channels().

#define RL_FILE_CHANNEL_NAME_LENGTH   16

Maximum channel description length.

Definition at line 65 of file rl_file.h.

#define RL_FILE_COMMENT   "This is a comment"

Comment for file header.

Definition at line 72 of file rl_file.h.

#define RL_FILE_COMMENT_ALIGNMENT_BYTES   sizeof(uint32_t)

Comment alignment in bytes.

Definition at line 75 of file rl_file.h.

Referenced by ambient_setup_lead_in(), file_setup_lead_in(), and file_store_header_bin().

#define RL_FILE_MAGIC   0x444C5225

File header magic number (ascii RLD)

Definition at line 59 of file rl_file.h.

Referenced by ambient_setup_lead_in(), and file_setup_lead_in().

#define RL_FILE_VERSION   0x03

File format version of current implementation.

Definition at line 62 of file rl_file.h.

Referenced by ambient_setup_lead_in(), and file_setup_lead_in().

#define RL_SCALE_GIGA   9

Definition at line 53 of file rl_file.h.

#define RL_SCALE_KILO   3

Definition at line 51 of file rl_file.h.

#define RL_SCALE_MEGA   6

Definition at line 52 of file rl_file.h.

#define RL_SCALE_MICRO   -6

Definition at line 48 of file rl_file.h.

Referenced by file_store_header_csv().

#define RL_SCALE_MILLI   -3

Definition at line 49 of file rl_file.h.

Referenced by file_store_header_csv().

#define RL_SCALE_NANO   -9

Definition at line 46 of file rl_file.h.

Referenced by file_setup_channels(), and file_store_header_csv().

#define RL_SCALE_NONE   0

Definition at line 50 of file rl_file.h.

Referenced by file_setup_channels().

#define RL_SCALE_PICO   -12

Copyright (c) 2016-2017, 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. Channel scaling definitions

Definition at line 44 of file rl_file.h.

#define RL_SCALE_TEN_NANO   -8

Definition at line 47 of file rl_file.h.

Referenced by file_setup_channels(), and file_store_header_csv().

#define RL_SCALE_TEN_PICO   -11

Definition at line 45 of file rl_file.h.

Referenced by file_setup_channels(), and file_store_header_csv().

#define RL_SCALE_TERA   12

Definition at line 54 of file rl_file.h.

Typedef Documentation

typedef enum unit rl_unit

Data unit definition

Enumeration Type Documentation

enum unit

Data unit definition

Enumerator
RL_UNIT_UNITLESS 

Unitless.

RL_UNIT_VOLT 

Voltage (electric)

RL_UNIT_AMPERE 

Current (electric)

RL_UNIT_BINARY 

Binary signal.

RL_UNIT_RANGE_VALID 

Range valid information.

RL_UNIT_LUX 

Lux (illuminance)

RL_UNIT_DEG_C 

Degree celcius (temperature)

RL_UNIT_INTEGER 

Integer channel (numeric)

RL_UNIT_PERCENT 

Percent (numeric, humidity)

RL_UNIT_PASCAL 

Pascal (preasure)

RL_UNIT_UNDEFINED 

Undefined unit.

Definition at line 82 of file rl_file.h.