TestBedTopologyM.nc
上传用户:joranyuan
上传日期:2022-06-23
资源大小:3306k
文件大小:1k
- // author: Ajit Warrier, using drand interface to find connectivity
- // on testbed topology
- module TestBedTopologyM {
- provides {
- interface StdControl;
- }
- uses {
- interface StdControl as SubControl;
- interface Drand;
- interface CC1000Control as RFset;
- }
- }
- implementation {
- command result_t StdControl.init() {
- call SubControl.init();
- return SUCCESS;
- }
- command result_t StdControl.start() {
- call SubControl.start();
- call RFset.SetRFPower(255); //lowest 1~0xFF highest
- // always call setrfpower after startdrand otherwise power reset
- return SUCCESS;
- }
- command result_t StdControl.stop(){
- call SubControl.stop();
- return SUCCESS;
- }
- async event void Drand.gotFrame(){}
- async event void Drand.helloOver(){
- //post stopDrand();
- }
- }