2 #include <boost/unordered_set.hpp> 3 #include <boost/exception/diagnostic_information.hpp> 4 #include <boost/make_shared.hpp> 15 std::cout <<
"E " << std::hex << f.
id << std::dec;
17 std::cout <<
"e " << std::hex << f.
id << std::dec;
19 std::cout <<
"s " << std::hex << f.
id << std::dec;
27 std::cout << (int) f.
dlc << std::hex;
29 for(
int i=0; i < f.
dlc; ++i){
30 std::cout << std::hex <<
" " << (int) f.
data[i];
34 std::cout << std::dec << std::endl;
38 boost::shared_ptr<class_loader::ClassLoader>
g_loader;
48 int main(
int argc,
char *argv[]){
50 if(argc != 2 && argc != 4){
51 std::cout <<
"usage: "<< argv[0] <<
" DEVICE [PLUGIN_PATH PLUGIN_NAME]" << std::endl;
58 g_loader = boost::make_shared<class_loader::ClassLoader>(argv[2]);
62 catch(std::exception& ex)
64 std::cerr << boost::diagnostic_information(ex) << std::endl;;
68 g_driver = boost::make_shared<SocketCANInterface>();
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
void print_state(const State &s)
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