Exemplo n.º 1
0
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);
		}
	}
}
Exemplo n.º 2
0
void SensorWrapper::setSensorId(const char *uid_str) {
	uuid_from_str(uid_str, &uuid);
}
Exemplo n.º 3
0
/* Constructor */
SensorWrapper::SensorWrapper(const char* n, const char* uid_str) {
  name = n;
  uuid_from_str(uid_str, &uuid);
}