| | |
| | | char pack_buf[1024]; |
| | | int pack_bytes; |
| | | pack_info_t pack_info; |
| | | pack_proc_t pack_proc = packet_string_pack; /* use string packet */ |
| | | pack_proc_t pack_proc = packet_segmented_pack; /* use string packet */ |
| | | |
| | | struct option opts[] = { |
| | | {"ipaddr", required_argument, NULL, 'i'}, |
| | |
| | | temper_integer(pack_info.temper), temper_fract(pack_info.temper)); |
| | | |
| | | get_devid(pack_info.devid, DEVID_LEN, sn); |
| | | get_time(pack_info.strtime, TIME_LEN); |
| | | get_time(&pack_info.sample_time); |
| | | |
| | | pack_bytes = pack_proc(&pack_info, pack_buf, sizeof(pack_buf)); |
| | | sample_flag = 1; /* set sample flag */ |