2 #include <boost/unordered_set.hpp> 3 #include <boost/exception/diagnostic_information.hpp> 4 #include <boost/make_shared.hpp> 17 std::cout <<
"E " << std::hex << f.
id << std::dec;
19 std::cout <<
"e " << std::hex << f.
id << std::dec;
21 std::cout <<
"s " << std::hex << f.
id << std::dec;
29 std::cout << (int) f.
dlc << std::hex;
31 for(
int i=0; i < f.
dlc; ++i){
32 std::cout << std::hex <<
" " << (int) f.
data[i];
36 std::cout << std::dec << std::endl;
40 boost::shared_ptr<class_loader::ClassLoader>
g_loader;
50 int main(
int argc,
char *argv[]){
52 if(argc != 2 && argc != 4){
53 std::cout <<
"usage: "<< argv[0] <<
" DEVICE [PLUGIN_PATH PLUGIN_NAME]" << std::endl;
60 g_loader = boost::make_shared<class_loader::ClassLoader>(argv[2]);
64 catch(std::exception& ex)
66 std::cerr << boost::diagnostic_information(ex) << std::endl;;
70 g_driver = boost::make_shared<SocketCANInterface>();
void print_error(const State &s)
DriverInterfaceSharedPtr g_driver
void print_frame(const Frame &f)
boost::array< value_type, 8 > data
array for 8 data bytes with bounds checking
boost::shared_ptr< DriverInterface > DriverInterfaceSharedPtr
CommInterface::FrameListenerConstSharedPtr FrameListenerConstSharedPtr
enum can::State::DriverState driver_state
int main(int argc, char *argv[])
unsigned int internal_error
driver specific error
StateInterface::StateListenerConstSharedPtr StateListenerConstSharedPtr
unsigned char dlc
len of data
boost::shared_ptr< class_loader::ClassLoader > g_loader
boost::system::error_code error_code
device access error