![]() ![]() | ![]() |
version 1.1, 2011/11/07 16:55:45 | version 1.1.2.1, 2011/11/07 16:55:46 |
---|---|
Line 0 | Line 1 |
#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; | |
} |