gusimplewhiteboard
wb_r_m_s_levels.h File Reference
#include <gu_util.h>
#include <stdint.h>
Include dependency graph for wb_r_m_s_levels.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wb_r_m_s_levels
 WHITEBOARD_POSTER_STRING_CONVERSION. More...
 

Macros

#define _XOPEN_SOURCE   700
 
#define RMS_LEVELS_GENERATED
 
#define RMS_LEVELS_C_STRUCT   wb_r_m_s_levels
 
#define RMS_LEVELS_NUMBER_OF_VARIABLES   4
 
#define RMS_LEVELS_DESC_BUFFER_SIZE   75
 
#define RMS_LEVELS_TO_STRING_BUFFER_SIZE   31
 

Functions

const char * wb_r_m_s_levels_description (const struct wb_r_m_s_levels *self, char *descString, size_t bufferSize)
 Convert to a description string. More...
 
const char * wb_r_m_s_levels_to_string (const struct wb_r_m_s_levels *self, char *toString, size_t bufferSize)
 Convert to a string. More...
 
struct wb_r_m_s_levelswb_r_m_s_levels_from_string (struct wb_r_m_s_levels *self, const char *str)
 Convert from a string. More...
 
size_t wb_r_m_s_levels_to_network_serialised (const struct wb_r_m_s_levels *self, char *dst)
 WHITEBOARD_POSTER_STRING_CONVERSION. More...
 
size_t wb_r_m_s_levels_from_network_serialised (const char *src, struct wb_r_m_s_levels *dst)
 Network stream deserialisation. More...
 

Macro Definition Documentation

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   700

Definition at line 72 of file wb_r_m_s_levels.h.

◆ RMS_LEVELS_C_STRUCT

#define RMS_LEVELS_C_STRUCT   wb_r_m_s_levels

Definition at line 91 of file wb_r_m_s_levels.h.

◆ RMS_LEVELS_DESC_BUFFER_SIZE

#define RMS_LEVELS_DESC_BUFFER_SIZE   75

Definition at line 95 of file wb_r_m_s_levels.h.

◆ RMS_LEVELS_GENERATED

#define RMS_LEVELS_GENERATED

Definition at line 90 of file wb_r_m_s_levels.h.

◆ RMS_LEVELS_NUMBER_OF_VARIABLES

#define RMS_LEVELS_NUMBER_OF_VARIABLES   4

Definition at line 92 of file wb_r_m_s_levels.h.

◆ RMS_LEVELS_TO_STRING_BUFFER_SIZE

#define RMS_LEVELS_TO_STRING_BUFFER_SIZE   31

Definition at line 96 of file wb_r_m_s_levels.h.

Function Documentation

◆ wb_r_m_s_levels_description()

const char * wb_r_m_s_levels_description ( const struct wb_r_m_s_levels self,
char *  descString,
size_t  bufferSize 
)

Convert to a description string.

Definition at line 125 of file wb_r_m_s_levels.c.

Referenced by guWhiteboard::RMSLevels::description(), and wb_dominant_frequencies_description().

◆ wb_r_m_s_levels_from_network_serialised()

size_t wb_r_m_s_levels_from_network_serialised ( const char *  src,
struct wb_r_m_s_levels dst 
)

Network stream deserialisation.

Network stream deserialisation.

Definition at line 389 of file wb_r_m_s_levels.c.

References wb_r_m_s_levels::front_left, wb_r_m_s_levels::front_right, ntohs, wb_r_m_s_levels::rear_left, and wb_r_m_s_levels::rear_right.

◆ wb_r_m_s_levels_from_string()

struct wb_r_m_s_levels * wb_r_m_s_levels_from_string ( struct wb_r_m_s_levels self,
const char *  str 
)

Convert from a string.

Definition at line 205 of file wb_r_m_s_levels.c.

References RMS_LEVELS_DESC_BUFFER_SIZE.

Referenced by wb_dominant_frequencies_from_string().

◆ wb_r_m_s_levels_to_network_serialised()

size_t wb_r_m_s_levels_to_network_serialised ( const struct wb_r_m_s_levels self,
char *  dst 
)

WHITEBOARD_POSTER_STRING_CONVERSION.

Network stream serialisation

WHITEBOARD_POSTER_STRING_CONVERSION.

Definition at line 322 of file wb_r_m_s_levels.c.

References htons.

◆ wb_r_m_s_levels_to_string()

const char * wb_r_m_s_levels_to_string ( const struct wb_r_m_s_levels self,
char *  toString,
size_t  bufferSize 
)

Convert to a string.

Definition at line 165 of file wb_r_m_s_levels.c.

Referenced by guWhiteboard::RMSLevels::to_string(), and wb_dominant_frequencies_to_string().