Пример #1
0
void supply_on(OpenMote* self) {
   
#ifdef TRACE_ON
   printf("C@0x%x: supply_on()... \n",self);
#endif
   
   // start the mote's execution
   mote_main(self);
   
#ifdef TRACE_ON
   printf("C@0x%x: ...done.\n",self);
#endif
}
Пример #2
0
/**
\brief Root function of the emulated mote.
*/
void supply_rootFunction() {
   int rxPacketType;
   int rxPktParamsLength;
   
   printf("Waiting for boot\r\n");
   
   // wait for the supply to switch on
   opensim_client_waitForPacket(&rxPacketType,
                                0,
                                0,
                                &rxPktParamsLength);
   
   // make sure this is the supply switching on
   if (rxPacketType!=OPENSIM_CMD_supply_on) {
      fprintf(stderr,"ERROR: expected OPENSIM_CMD_supply_on, got command %d\n",
                                  rxPacketType);
      opensim_client_abort();
   }
   
   mote_main();
}
Пример #3
0
int main(void) {
   return mote_main();
}
Пример #4
0
int main() {
   return mote_main();
}