static void parse_blob_opt(char *arg, uuid_t *uuid, char *filename, size_t len) { char *p; for (p = strtok(arg, ","); p != NULL; p = strtok(NULL, ",")) { if (strncmp(p, "uuid=", strlen("uuid=")) == 0) { p += strlen("uuid="); uuid_from_str(uuid, p); } else if (strncmp(p, "file=", strlen("file=")) == 0) { p += strlen("file="); snprintf(filename, len, "%s", p); } } }
void SensorWrapper::setSensorId(const char *uid_str) { uuid_from_str(uid_str, &uuid); }
/* Constructor */ SensorWrapper::SensorWrapper(const char* n, const char* uid_str) { name = n; uuid_from_str(uid_str, &uuid); }