Wiselib
|
00001 // vim: set noexpandtab ts=4 sw=4: 00002 00003 #ifndef PC_OS_MODEL_H 00004 #define PC_OS_MODEL_H 00005 00006 #include <boost/detail/endian.hpp> 00007 #include <stdint.h> 00008 00009 #include "external_interface/default_return_values.h" 00010 #include "com_isense_radio.h" 00011 #include "pc_com_uart_file.h" 00012 #include "pc_clock.h" 00013 #include "pc_debug.h" 00014 #include "pc_os.h" 00015 #include "pc_rand.h" 00016 #include "pc_timer.h" 00017 #include "util/serialization/endian.h" 00018 00019 char pc_os_default_uart_port[] = "/dev/ttyUSB0"; 00020 00021 namespace wiselib { 00022 class PCOsModel 00023 : public DefaultReturnValues<PCOsModel> 00024 { 00025 public: 00026 typedef PCOs AppMainParameter; 00027 typedef PCOs Os; 00028 00029 typedef uint32_t size_t; 00030 typedef uint8_t block_data_t; 00031 00032 typedef PCClockModel<PCOsModel> Clock; 00033 typedef PCDebug<PCOsModel> Debug; 00034 00035 typedef PCRandModel<PCOsModel> Rand; 00036 typedef PCTimerModel<PCOsModel, 100> Timer; 00037 00038 // Radio model can only exist when port for communication with the 00039 // isense node is known so it should be instantiated by the user 00040 typedef PCComUartModel<PCOsModel, pc_os_default_uart_port> Uart; 00041 typedef ComISenseRadioModel<PCOsModel, Uart> Radio; 00042 00043 static const Endianness endianness = WISELIB_ENDIANNESS; 00044 }; 00045 } // ns wiselib 00046 00047 #endif // PC_OS_MODEL_H 00048