File:  [ELWIX - Embedded LightWeight unIX -] / mqtt / example / Attic / test.c
Revision 1.1.2.1: download - view: text, annotated - select for diffs - revision graph
Mon Nov 7 16:55:46 2011 UTC (12 years, 8 months ago) by misho
Branches: mqtt1_0
added funcs & unit test

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "aitmqtt.h"


int
main(int argc, char **argv)
{
	mqtthdr_var_t *v;

	if (argc < 2)
		return 1;

	v = mqtt_str2var((u_char*) argv[1], strlen(argv[1]) + 1);
	printf("msb=%hhd lsb=%hhd val=%hd %s\n", 
			v->var_sb.sb.m, v->var_sb.sb.l, v->var_sb.val, v->var_data);
	free(v);

	return 0;
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>