optris_sdk_csv_options
How a CSV snapshot spells its table, for a spreadsheet set to a locale other than English. Mirrors optris::sdk::rec::CsvOptions.
optris_sdk_csv_options_init() fills in the spelling a CSV snapshot has always had: , between values, . before the decimals, nan for a pixel that was not measured, and the # header lines. That is the form for programs. A spreadsheet set to German, French or most other European locales splits on ; and reads , as the decimal separator; ask for that with delimiter = ;'anddecimal_separator = ','`.
The output depends on these fields and on nothing else. The process locale (setlocale(), the Windows regional settings) never reaches the file.
A struct of its own rather than fields on optris_sdk_snapshot_options, because none of it means anything to the other three formats and because a 12.0 patch does not grow a struct that has shipped. Every field is spelled so that zero is what the SDK did before the struct existed: a struct zeroed by hand, with only struct_size set, writes the historic file too.
Public attributes
struct_size
uint32_t struct_size
Set to sizeof(optris_sdk_csv_options), or call optris_sdk_csv_options_init().
delimiter
uint8_t delimiter
What goes between two values on a row, as an ASCII character: ,'(the default),';'or'\t'. Zero means','. Anything else is refused with OPTRIS_SDK_ERROR_INVALID_ARGUMENT`.
decimal_separator
uint8_t decimal_separator
What goes before the decimals, as an ASCII character: .'(the default) or','. Zero means'.'. Anything else is refused with OPTRIS_SDK_ERROR_INVALID_ARGUMENT, and so is a decimal separator equal to #delimiter. It applies to every number in the file, the#` header lines included.
reserved0
uint8_t reserved0[2]
Reserved; always zero. Named so the struct has no implicit padding after decimal_separator.
leave_unmeasured_empty
int32_t leave_unmeasured_empty
Non-zero writes a pixel that was not measured as an empty field instead of nan. Every spreadsheet reads an empty field as a blank cell; it reads nan as text.
omit_header_lines
int32_t omit_header_lines
Non-zero leaves out the # header lines, so the file is the table and nothing else. The # Unit: line goes with them.
temperature_unit
optris_sdk_temperature_unit temperature_unit
The unit every temperature in the file is written in: the pixels and the ambient header line. OPTRIS_SDK_TEMPERATURE_UNIT_CELSIUS (zero) by default.
In Fahrenheit each value is converted at full precision and then rounded once to the file's two decimals, half away from zero, as optris_sdk_temperature_format() rounds; nan stays nan; the header says # Unit: degF, and the ambient line is keyed AmbientTempF rather than AmbientTempC. Every file, Celsius too, names its unit on a # Unit: line. Any other value is refused with OPTRIS_SDK_ERROR_INVALID_ARGUMENT.