Go to the source code of this file.
Defines | |
#define | MIN(a, b) (((a)<(b))?(a):(b)) |
Functions | |
int | p_util_escape (unsigned char *out_data, const unsigned char *in_data, size_t len, size_t maxlen) |
Escaping data. | |
int | p_util_unescape (unsigned char *out_data, const unsigned char *in_data, size_t len, size_t maxlen) |
Unescaping data. | |
int | p_util_decode_dot (uint8_t *out, const char *dotted_str, size_t len) |
Decoding a dotted string to an array of bytes. | |
char * | p_util_acl2str (const uint8_t *acl_type, char *out) |
Decoding 3 characters out of 2 bytes. | |
uint8_t * | p_util_str2acl (const char *in, uint8_t *acl_type) |
Coding 3 characters into 2 bytes. | |
void | p_util_location2raw (uint8_t root[16], const char *node1, const char *node2, const char *node3, const char *node4, int x, int y, int z, uint8_t deviation, unsigned char location[44]) |
Encode / Calculate a location-string. | |
void | p_util_raw2location (uint8_t root[16], char node1[10], char node2[10], char node3[10], char node4[10], int *x, int *y, int *z, uint8_t *deviation, const unsigned char location[44]) |
Decoding / parse a location-string. | |
int | p_util_3to2 (uint8_t *out, const char *in, size_t len) |
: Coding strings with 3to2 | |
int | p_util_2to3 (char *out, const uint8_t *in, size_t len) |
: Decoding strings with 2to3 | |
int | p_util_crc16 (const char *data, size_t length, uint8_t *phb, uint8_t *plb) |
Calculates CRC16. | |
int | p_util_crc16_append (char *data, size_t length) |
Calculates CRC16 and appends the result to data. | |
int | p_util_crc16_check (const char *data, size_t length) |
Tests whether the CRC is correct. | |
int | p_util_get_local_interfaces (uint32_t ip[], uint32_t broadcast[], size_t max) |
Get all local IP-address and according broadcast-addresses. | |
int | p_util_get_local_addresses (uint32_t *ip, uint32_t *broadcast) |
Get a single local IP-address and according broadcast-address. | |
uint32_t | p_util_getmstime () |
Get a timestamp. | |
void | p_util_sleepms (unsigned long milliseconds) |
Lets the program sleep. | |
char * | p_util_strerr (int error) |
returns a little description for libparticle error numbers | |
void | p_util_perror (const char *str) |
print the current error message | |
char * | p_util_location2WKT (const unsigned char location[44], char *wkt, size_t n) |
returns the GPS location in WKT (Well known Text) Format |
Definition in file util.h.
#define MIN | ( | a, | |||
b | ) | (((a)<(b))?(a):(b)) |