本文整理匯總了Java中net.tinyos.message.MoteIF類的典型用法代碼示例。如果您正苦於以下問題:Java MoteIF類的具體用法?Java MoteIF怎麽用?Java MoteIF使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MoteIF類屬於net.tinyos.message包,在下文中一共展示了MoteIF類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import net.tinyos.message.MoteIF; //導入依賴的package包/類
/**
* A Test class to check if the wrapper works.
* @param args
* @throws Exception
*/
public static void main ( String [ ] args ) throws Exception {
PhoenixSource reader = BuildSource.makePhoenix( BuildSource.makeSF( "eflumpc24.epfl.ch" , 2020 ), null );
reader.start( );
MoteIF moteif = new MoteIF( reader );
moteif.registerListener( new SensorScopeDataMsg( ) , new MessageListener( ) {
public void messageReceived ( int dest , Message rawMsg ) {
System.out.println( "Received." );
}
} );
}
示例2: SerialCommunicator
import net.tinyos.message.MoteIF; //導入依賴的package包/類
public SerialCommunicator() {
phoenix = BuildSource.makePhoenix("[email protected]/dev/ttyUSB0:telos", PrintStreamMessenger.err);
mote = new MoteIF(phoenix);
mote.registerListener(new HarvestAnswerSerialMsg(), this);
}
示例3: getMoteIF
import net.tinyos.message.MoteIF; //導入依賴的package包/類
/**
* Can be used by other classes which are extending this class to create elaborated communication such
* as send a packet back to the sensor network.
* @return
*/
protected MoteIF getMoteIF() {
return moteIF;
}