libsigrok  0.3.0
sigrok hardware access and backend library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
strutil.c File Reference

Helper functions for handling or converting libsigrok-related strings. More...

#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "libsigrok.h"
#include "libsigrok-internal.h"
+ Include dependency graph for strutil.c:

Go to the source code of this file.

Functions

char * sr_si_string_u64 (uint64_t x, const char *unit)
 Convert a numeric value value to its "natural" string representation in SI units. More...
 
char * sr_samplerate_string (uint64_t samplerate)
 Convert a numeric samplerate value to its "natural" string representation. More...
 
char * sr_period_string (uint64_t frequency)
 Convert a numeric frequency value to the "natural" string representation of its period. More...
 
char * sr_voltage_string (uint64_t v_p, uint64_t v_q)
 Convert a numeric voltage value to the "natural" string representation of its voltage value. More...
 
char ** sr_parse_triggerstring (const struct sr_dev_inst *sdi, const char *triggerstring)
 Parse a trigger specification string. More...
 
int sr_parse_sizestring (const char *sizestring, uint64_t *size)
 Convert a "natural" string representation of a size value to uint64_t. More...
 
uint64_t sr_parse_timestring (const char *timestring)
 Convert a "natural" string representation of a time value to an uint64_t value in milliseconds. More...
 
gboolean sr_parse_boolstring (const char *boolstr)
 
int sr_parse_period (const char *periodstr, uint64_t *p, uint64_t *q)
 
int sr_parse_voltage (const char *voltstr, uint64_t *p, uint64_t *q)
 

Detailed Description

Helper functions for handling or converting libsigrok-related strings.

Definition in file strutil.c.