Contiki有一个clock模块和一系列timer模块:timer,stimer,ctimer,etimer,和rtimer。 一、clock模块 clock模块提供一些处理系统时间的函数,还有一些用来阻塞CPU的函数。 timer模块的实现以clock模块为基础。 二、timer和stimer模 ...
分类:
其他好文 时间:
2016-10-12 11:38:34
阅读次数:
386
之前都是从各个模块开始看起,从底层开始看起。应该改变一下思路,从高往下看,站得高看得远。 一、Main函数 源码:contiki-release-2-7\platform\stm32test\contiki-main.c 主函数中,关于进程的操作: 先对进程进行初始化process_init()。 ...
分类:
系统相关 时间:
2016-08-28 19:21:56
阅读次数:
304
一、事件相关数据结构 1、事件结构体 其中process_event_t和process_data_t的定义: 所以event_data结构体中的ev是一个unsigned char型数据,标识事件的类型。 (1)事件标识ev 其中0-127为用户进程内使用,128-255用于不同进程之间的通信。 ...
分类:
其他好文 时间:
2016-08-27 22:07:44
阅读次数:
273
本文涉及到的Protothread机制知识,在http://www.cnblogs.com/songdechiu/p/5793717.html 进程类型 进程类型主要有协同式(cooperative)和抢占式(preemptive)两种。 协同式进程,要等其他进程运行完进程实体函数(进程不一定运行完 ...
分类:
其他好文 时间:
2016-08-22 23:12:20
阅读次数:
162
/** * \defgroup coding-style Coding style * * This is how a Doxygen module is documented - start with a \defgroup * Doxygen keyword at the beginning o ...
分类:
其他好文 时间:
2016-08-19 23:53:50
阅读次数:
220
一、Ubuntu14.04下配置 1、配置vimrc文件 输入:version课查看vimrc文件及位置: system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc“(建议放置位置) 2nd user vimrc file: "~/ ...
分类:
系统相关 时间:
2016-08-13 19:37:47
阅读次数:
486
I'm using simple_udp_sendto to communicate between nodes. A border router was initialized with a prefix to start the RPL mesh netwrok. I'm sending lar ...
分类:
其他好文 时间:
2016-08-07 16:52:32
阅读次数:
116
一、官方网站 官网主页:http://contiki-os.org/ 资源和支持:http://contiki-os.org/support.html The Contiki Community: http://contiki-os.org/community.html Community Wiki ...
分类:
其他好文 时间:
2016-08-03 14:56:50
阅读次数:
150
1 DATA recv '25.00 degres' from 2423:7c02:5525:4f2b2 DATA recv '27.71 degres' from 24f7:af03:5525:4f283 DATA recv '26.11 degres' from 2420:a007:5525:4 ...
分类:
其他好文 时间:
2016-08-01 10:44:35
阅读次数:
307
1.1 LIST_CONCAT 该宏的作用非常简单,将s1,s2拼接在一起。其中,##起连接作用,编译器在预处理时负责将s1,s2连接在一起。比如hello_##world经过编译器预处理后就变成了hello_world了。 1.2 LIST 经过宏替换后,变为 该宏用于申明一个链表。可以将name ...
分类:
其他好文 时间:
2016-07-05 10:00:57
阅读次数:
223