资源简介
oneNET详细资料。。。。。。。。。。。。。。。。。。。。。。。。。
代码片段和文件信息
#include
#include
#include
#include
#include
typedef enum
{
MIPL_DEBUG_LEVEL_NONE = 0
MIPL_DEBUG_LEVEL_RXL
MIPL_DEBUG_LEVEL_RXL_RXD
MIPL_DEBUG_LEVEL_TXL_TXD
} MIPL_DEBUG_LEVEL_E;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned uint32;
typedef struct
{
uint8 boot;
uint8 encrypt;
MIPL_DEBUG_LEVEL_E debug;
uint16 port;
uint32 keep_alive;
size_t uri_len;
char* uri;
size_t ep_len;
char* ep;
uint8 block1; //COAP option BLOCK1(PUT or POST)0-6. 2^(4+n) bytes
uint8 block2; //COAP option BLOCK2(GET)0-6. 2^(4+n) bytes
uint8 block2th; //max size to trigger block-wise operation0-2. 2^(8+n) bytes
} MIPL_T;
void usage( const char *name )
{
printf( “Usage: %s [OPTION]\r\n“ name );
printf( “Launch a client.\r\n“ );
printf( “version: v1.2\r\n“ );
printf( “Options:\r\n“ );
printf( “-b BOOT\t\tSet the bootstrap mode of the client.Default: 0\r\n“ );
printf( “-d DEBUG\tSet the debug mode of the client.Default: 0\r\n“ );
printf( “-e ENCRYPT\tSet the encrypt of the client.\r\n“ );
printf( “-i URI\t\tSet the coap uri of the server to connect to. For example: coap://localhost:5683\r\n“ );
printf( “-n NAME\t\tSet the endpoint name[imei;imsi] of the client.\r\n“ );
printf( “-p PORT\t\tSet the local port of the client to bind to. Default: srand\r\n“ );
printf( “-t TIME\t\tSet the lifetime of the client. Default: 300\r\n“ );
printf( “-u BLOCK1\tSet COAP option BLOCK1(PUT or POST)0-6. Default 5(512B)2^(4+n)\r\n“);
printf( “-g BLOCK2\tSet COAP option BLOCK2(GET)0-6. Default 5(512B)2^(4+n)\r\n“);
printf( “-x BLOCK2TH\tSet max size to trigger block-wise operation0-2. Default 2(1024B)2^(8+n)\r\n“);
printf( “\r\n“ );
}
void output_buffer(unsigned char *buffer int lengthint index int flag)
{
int i = 0;
while ( i < length )
{
printf( “%02X“ buffer[i++] );
}
printf(“%d%d\r\n“indexflag);
}
/*****************************************************************
0 1 2 3
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| boot | encrypt| debug | local_port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| life_time |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| host_len | host |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ep_name_len | ep_name(imei;imsi) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| coap_block1 | coap_block2 | block2th |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*****************************************************************/
void mipl_generate(char *buf size_t buflen
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1089536 2017-04-11 17:28 OneNET_M5310\COAP.IAB
文件 10968 2017-04-11 17:28 OneNET_M5310\COAP.IAD
文件 290816 2017-03-31 16:14 OneNET_M5310\COAP.IMB
文件 3168 2017-04-06 23:37 OneNET_M5310\COAP.IMD
文件 552 2018-03-05 16:48 OneNET_M5310\COAP.PFI
文件 776 2018-03-05 16:48 OneNET_M5310\COAP.PO
文件 51992 2017-11-21 09:16 OneNET_M5310\COAP.PR
文件 289944 2017-04-09 21:52 OneNET_M5310\COAP.PRI
文件 2121960 2017-04-18 16:39 OneNET_M5310\COAP.PS
文件 6316 2017-11-29 20:04 OneNET_M5310\COAP.SearchResults
文件 95957 2018-03-05 16:48 OneNET_M5310\COAP.WK3
文件 3260 2018-03-03 09:03 OneNET_M5310\Hal\adxl345.c
文件 647 2017-04-20 08:29 OneNET_M5310\Hal\adxl345.h
文件 2274 2017-11-16 14:45 OneNET_M5310\Hal\beep.c
文件 278 2017-04-14 11:13 OneNET_M5310\Hal\beep.h
文件 12671 2018-03-03 09:03 OneNET_M5310\Hal\BH1750.c
文件 1709 2017-09-27 16:59 OneNET_M5310\Hal\BH1750.h
文件 4162 2018-03-03 09:02 OneNET_M5310\Hal\BMP180.c
文件 670 2017-09-27 17:00 OneNET_M5310\Hal\BMP180.h
文件 20430 2017-09-29 15:19 OneNET_M5310\Hal\codetab.h
文件 10506 2017-11-16 15:00 OneNET_M5310\Hal\i2c.c
文件 1171 2017-04-14 09:21 OneNET_M5310\Hal\i2c.h
文件 4342 2018-01-08 19:48 OneNET_M5310\Hal\key.c
文件 602 2017-11-16 14:41 OneNET_M5310\Hal\key.h
文件 3892 2018-03-01 12:35 OneNET_M5310\Hal\led.c
文件 461 2017-04-14 10:54 OneNET_M5310\Hal\led.h
文件 7063 2017-09-29 15:31 OneNET_M5310\Hal\OLED.c
文件 739 2017-09-29 14:11 OneNET_M5310\Hal\OLED.h
文件 7407 2017-11-29 17:03 OneNET_M5310\Hal\sht20.c
文件 620 2017-11-29 17:02 OneNET_M5310\Hal\sht20.h
............此处省略303个文件信息
- 上一篇:8 位cpu的verilog实现
- 下一篇:高频电子线路 pdf
评论
共有 条评论