23 #ifndef _STRAININTERFACE_H_
24 #define _STRAININTERFACE_H_
39 enum class Network { ETH = 0, socketcan = 1, ecan = 2, unknown = 8 };
41 enum class CanAddress { one = 1, two = 2, three = 3, four = 4, five = 5, six = 6, seven = 7, eigth = 8,
42 nine = 9, ten = 10, eleven = 11, twelve = 12, thirteen = 13, fourteen = 14 };
51 static const string nets[] = {
"ETH",
"socketcan",
"ecan"};
return nets[
static_cast<unsigned char>(network)];
53 void load_default() { network = Network::ETH; canbus = CanBus::two; canaddress = CanAddress::two; txrate = 2; }
55 int get_canbus()
const {
return static_cast<int>(canbus); }
63 bool open(
const Config &cfg = Config());
66 bool get(
const unsigned int number, vector<cDownloader::strain_value_t> &values);
68 bool print(
const vector<cDownloader::strain_value_t> &values, FILE *
fp = NULL);
bool print(const pc104Data &pc104data)
static struct bpf_program fp
const string & get_networkstring() const
int get_canaddress() const