gusimplewhiteboard
|
#include <gu_util.h>
#include <stdint.h>
#include <guunits/guunits.h>
#include <gucoordinates/gucoordinates.h>
Go to the source code of this file.
Classes | |
struct | wb_location |
WHITEBOARD_POSTER_STRING_CONVERSION. More... | |
Macros | |
#define | _XOPEN_SOURCE 700 |
#define | LOCATION_GENERATED |
#define | LOCATION_C_STRUCT wb_location |
#define | LOCATION_NUMBER_OF_VARIABLES 5 |
#define | LOCATION_DESC_BUFFER_SIZE 108 |
#define | LOCATION_TO_STRING_BUFFER_SIZE 43 |
Functions | |
const char * | wb_location_description (const struct wb_location *self, char *descString, size_t bufferSize) |
Convert to a description string. More... | |
const char * | wb_location_to_string (const struct wb_location *self, char *toString, size_t bufferSize) |
Convert to a string. More... | |
struct wb_location * | wb_location_from_string (struct wb_location *self, const char *str) |
Convert from a string. More... | |
struct wb_location | rr_coord_to_wb_location (const gu_relative_coordinate coord, const uint8_t confidence, const uint32_t distanceVariance, const uint32_t directionVariance) |
WHITEBOARD_POSTER_STRING_CONVERSION. More... | |
struct gu_relative_coordinate | wb_location_to_rr_coord (const struct wb_location location) |
Converts a wb_location to a gu_relative_coordinate. More... | |
struct gu_optional_relative_coordinate | wb_location_to_opt_rr_coord (const struct wb_location location, const uint8_t confidence) |
Converts a wb_location to a gu_optional_relative_coordinate. More... | |
size_t | wb_location_to_network_serialised (const struct wb_location *self, char *dst) |
Network stream serialisation. More... | |
size_t | wb_location_from_network_serialised (const char *src, struct wb_location *dst) |
Network stream deserialisation. More... | |
#define _XOPEN_SOURCE 700 |
Definition at line 72 of file wb_location.h.
#define LOCATION_C_STRUCT wb_location |
Definition at line 93 of file wb_location.h.
#define LOCATION_DESC_BUFFER_SIZE 108 |
Definition at line 97 of file wb_location.h.
#define LOCATION_GENERATED |
Definition at line 92 of file wb_location.h.
#define LOCATION_NUMBER_OF_VARIABLES 5 |
Definition at line 94 of file wb_location.h.
#define LOCATION_TO_STRING_BUFFER_SIZE 43 |
Definition at line 98 of file wb_location.h.
struct wb_location rr_coord_to_wb_location | ( | const gu_relative_coordinate | coord, |
const uint8_t | confidence, | ||
const uint32_t | distanceVariance, | ||
const uint32_t | directionVariance | ||
) |
WHITEBOARD_POSTER_STRING_CONVERSION.
Converts a gu_relative_coordinate to a wb_location.
[in] | coord | The gu_relative_coordinate which is being converted. |
[in] | confidence | The confidence value for the new location. |
[in] | distanceVariance | The distanceVariance value for the new location. |
[in] | directionVariance | The directionVariance value for the new location. |
Definition at line 511 of file wb_location.c.
References wb_location::confidence, wb_location::directionVariance, and wb_location::distanceVariance.
const char * wb_location_description | ( | const struct wb_location * | self, |
char * | descString, | ||
size_t | bufferSize | ||
) |
Convert to a description string.
Definition at line 125 of file wb_location.c.
Referenced by guWhiteboard::Location::description().
size_t wb_location_from_network_serialised | ( | const char * | src, |
struct wb_location * | dst | ||
) |
Network stream deserialisation.
Network stream deserialisation.
Definition at line 426 of file wb_location.c.
References wb_location::confidence, wb_location::direction, wb_location::directionVariance, wb_location::distance, wb_location::distanceVariance, ntohl, and ntohs.
struct wb_location * wb_location_from_string | ( | struct wb_location * | self, |
const char * | str | ||
) |
Convert from a string.
Definition at line 221 of file wb_location.c.
References LOCATION_DESC_BUFFER_SIZE.
size_t wb_location_to_network_serialised | ( | const struct wb_location * | self, |
char * | dst | ||
) |
Network stream serialisation.
Network stream serialisation.
Definition at line 345 of file wb_location.c.
struct gu_optional_relative_coordinate wb_location_to_opt_rr_coord | ( | const struct wb_location | location, |
const uint8_t | confidence | ||
) |
Converts a wb_location to a gu_optional_relative_coordinate.
[in] | location | The wb_location which is being converted. |
[in] | confidence | The minimum confidence value that location needs to be in order for the returning gu_optional_relative_coordinate to contain a value. If the locations confidence is less than this value then this function returns a gu_optional_realtive_coordinate where gu_optional_relative_coordinate::has_value is false. |
Definition at line 532 of file wb_location.c.
References wb_location_to_rr_coord().
Referenced by guWhiteboard::Location::optionalRelativeCoordinate().
struct gu_relative_coordinate wb_location_to_rr_coord | ( | const struct wb_location | location | ) |
Converts a wb_location to a gu_relative_coordinate.
[in] | location | The wb_location which is being converted. |
Definition at line 523 of file wb_location.c.
Referenced by guWhiteboard::Location::relativeCoordinate(), and wb_location_to_opt_rr_coord().
const char * wb_location_to_string | ( | const struct wb_location * | self, |
char * | toString, | ||
size_t | bufferSize | ||
) |
Convert to a string.
Definition at line 173 of file wb_location.c.
Referenced by guWhiteboard::Location::to_string().