Skip to content
Permalink
f6c49bff76
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
30 lines (22 sloc) 557 Bytes
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <iomanip>
#include <iostream>
#include <string>
#include "can_wrap.h"
using can::operator<<;
int main( int argc, char* argv[] )
{
const std::string canChannel = "vcan0";
const int canSocket = can::connect( canChannel );
std::cout << std::hex << std::uppercase << std::setfill('0');
for( int c=0; c<100; ++c )
{
auto frame = can::read( canSocket );
std::cout << frame << std::endl;
}
can::close( canSocket );
return 0;
}