Wiselib
wiselib.testing/external_interface/pc/isense_roombaclient/src/SerialRoombaApp.h
Go to the documentation of this file.
00001 #ifndef SERIAL_ROOMBA_APP_H
00002 #define SERIAL_ROOMBA_APP_H
00003 
00004 #include <isense/isense.h>
00005 #include <isense/application.h>
00006 #include <isense/dispatcher.h>
00007 #include <isense/os.h>
00008 #include <isense/radio.h>
00009 #include <isense/uart.h>
00010 #include <isense/data_handlers.h>
00011 //#include <isense/task.h>
00012 
00013 using namespace isense;
00014 
00018 class SerialRoombaApp:
00019    public Application,
00020    public Receiver,
00021    public Sender,
00022    public UartPacketHandler
00023 {
00024 private:
00025    Uart& uart_;
00026 
00027 public:
00028    SerialRoombaApp( Os& os );
00029    virtual ~SerialRoombaApp()
00030    {
00031    }
00032 
00033    virtual void boot( void );
00034    virtual void receive( uint8 len, const uint8 * msg,
00035       ISENSE_RADIO_ADDR_TYPE src_addr, ISENSE_RADIO_ADDR_TYPE dest_addr,
00036       uint16 signal_strength, uint16 signal_quality, uint8 sequence_no,
00037       uint8 interface, Time rx_time );
00038    virtual void confirm( uint8 type, uint8 tries, Time time )
00039    {
00040    }
00041    virtual void handle_uart_packet( uint8 type, uint8 * buf, uint8 length );
00042 
00043 };
00044 
00045 Application* application_factory( Os& );
00046 
00047 #endif // SERIAL_ROOMBA_APP_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines