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

Go to the source code of this file.

Classes

struct  wb_polar_coordinate
 WHITEBOARD_POSTER_STRING_CONVERSION. More...
 

Macros

#define _XOPEN_SOURCE   700
 
#define POLAR_COORDINATE_GENERATED
 
#define POLAR_COORDINATE_C_STRUCT   wb_polar_coordinate
 
#define POLAR_COORDINATE_NUMBER_OF_VARIABLES   2
 
#define POLAR_COORDINATE_DESC_BUFFER_SIZE   33
 
#define POLAR_COORDINATE_TO_STRING_BUFFER_SIZE   14
 

Functions

const char * wb_polar_coordinate_description (const struct wb_polar_coordinate *self, char *descString, size_t bufferSize)
 Convert to a description string. More...
 
const char * wb_polar_coordinate_to_string (const struct wb_polar_coordinate *self, char *toString, size_t bufferSize)
 Convert to a string. More...
 
struct wb_polar_coordinatewb_polar_coordinate_from_string (struct wb_polar_coordinate *self, const char *str)
 Convert from a string. More...
 
size_t wb_polar_coordinate_to_network_serialised (const struct wb_polar_coordinate *self, char *dst)
 WHITEBOARD_POSTER_STRING_CONVERSION. More...
 
size_t wb_polar_coordinate_from_network_serialised (const char *src, struct wb_polar_coordinate *dst)
 Network stream deserialisation. More...
 

Macro Definition Documentation

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   700

Definition at line 72 of file wb_polar_coordinate.h.

◆ POLAR_COORDINATE_C_STRUCT

#define POLAR_COORDINATE_C_STRUCT   wb_polar_coordinate

Definition at line 91 of file wb_polar_coordinate.h.

◆ POLAR_COORDINATE_DESC_BUFFER_SIZE

#define POLAR_COORDINATE_DESC_BUFFER_SIZE   33

Definition at line 95 of file wb_polar_coordinate.h.

◆ POLAR_COORDINATE_GENERATED

#define POLAR_COORDINATE_GENERATED

Definition at line 90 of file wb_polar_coordinate.h.

◆ POLAR_COORDINATE_NUMBER_OF_VARIABLES

#define POLAR_COORDINATE_NUMBER_OF_VARIABLES   2

Definition at line 92 of file wb_polar_coordinate.h.

◆ POLAR_COORDINATE_TO_STRING_BUFFER_SIZE

#define POLAR_COORDINATE_TO_STRING_BUFFER_SIZE   14

Definition at line 96 of file wb_polar_coordinate.h.

Function Documentation

◆ wb_polar_coordinate_description()

const char * wb_polar_coordinate_description ( const struct wb_polar_coordinate self,
char *  descString,
size_t  bufferSize 
)

◆ wb_polar_coordinate_from_network_serialised()

size_t wb_polar_coordinate_from_network_serialised ( const char *  src,
struct wb_polar_coordinate dst 
)

Network stream deserialisation.

Network stream deserialisation.

Definition at line 315 of file wb_polar_coordinate.c.

References wb_polar_coordinate::direction, wb_polar_coordinate::distance, and ntohs.

◆ wb_polar_coordinate_from_string()

struct wb_polar_coordinate * wb_polar_coordinate_from_string ( struct wb_polar_coordinate self,
const char *  str 
)

Convert from a string.

Definition at line 173 of file wb_polar_coordinate.c.

References POLAR_COORDINATE_DESC_BUFFER_SIZE.

Referenced by wb_line_sighting_from_string(), and wb_vision_detection_feature_from_string().

◆ wb_polar_coordinate_to_network_serialised()

size_t wb_polar_coordinate_to_network_serialised ( const struct wb_polar_coordinate self,
char *  dst 
)

WHITEBOARD_POSTER_STRING_CONVERSION.

Network stream serialisation

WHITEBOARD_POSTER_STRING_CONVERSION.

Definition at line 276 of file wb_polar_coordinate.c.

References htons.

◆ wb_polar_coordinate_to_string()

const char * wb_polar_coordinate_to_string ( const struct wb_polar_coordinate self,
char *  toString,
size_t  bufferSize 
)