[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/imote2/tos/lib/TimeSync CommModuleM.nc, NONE, 1.1 CommModuleC.nc, NONE, 1.1

Lama Nachman lnachman at users.sourceforge.net
Mon Oct 23 20:01:01 PDT 2006


Update of /cvsroot/tinyos/tinyos-1.x/contrib/imote2/tos/lib/TimeSync
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6502

Added Files:
	CommModuleM.nc CommModuleC.nc 
Log Message:
Used Generic Comm


--- NEW FILE: CommModuleM.nc ---
includes TimeSyncMsg;
includes trace;

module CommModuleM {
  provides {
      //interface StdControl as Control;
    command result_t ComputeByteOffset(uint8_t* lo, uint8_t* hi);
  }
}

implementation {
    command result_t ComputeByteOffset(uint8_t* low, uint8_t* high) {
        *low = offsetof(TimeSyncMsg,sendingTime);
        *high = offsetof(TimeSyncMsg,sendingTimeHigh);
        return SUCCESS;
    }

}

--- NEW FILE: CommModuleC.nc ---
configuration CommModuleC {
  provides interface StdControl;
  provides interface SendMsg[uint8_t id];
  provides interface ReceiveMsg[uint8_t id];
  provides command result_t ComputeByteOffset(uint8_t* lo, uint8_t* hi);
}

implementation {
  components GenericComm, CommModuleM;

  StdControl = GenericComm.Control;
  SendMsg = GenericComm.SendMsg;
  ReceiveMsg = GenericComm.ReceiveMsg;
  ComputeByteOffset = CommModuleM.ComputeByteOffset;

}




More information about the Tinyos-contrib-commits mailing list