iCub-main
Loading...
Searching...
No Matches
abstractEthResource.h
Go to the documentation of this file.
1// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3/*
4 * Copyright (C) 2017 iCub Facility - Istituto Italiano di Tecnologia
5 * Author: Valentina Gaggero
6 * email: valentina.gaggero@iit.it
7 * website: www.robotcub.org
8 * Permission is granted to copy, distribute, and/or modify this program
9 * under the terms of the GNU General Public License, version 2 or any
10 * later version published by the Free Software Foundation.
11 *
12 * A copy of the license can be found at
13 * http://www.robotcub.org/icub/license/gpl.txt
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18 * Public License for more details
19*/
20
21// - include guard ----------------------------------------------------------------------------------------------------
22
23#ifndef _ABSTRACTETHRESOURCE_H_
24#define _ABSTRACTETHRESOURCE_H_
25
26
27#include "EoProtocol.h"
28#include <vector>
29#include <yarp/os/Searchable.h>
30
31
32#include "hostTransceiver.hpp"
33
34
35using namespace std;
36
37
38namespace eth {
39
41 {
42 public:
43
45 {
46 eOipv4addr_t ipv4addr;
47 eOipv4addressing_t ipv4addressing;
48 eObrd_ethtype_t boardtype;
49 eOversion_t firmwareversion;
50 eOdate_t firmwaredate;
57 };
58
59 //AbstractEthResource();
60 // virtual ~AbstractEthResource() = 0;
61
62
63 virtual bool open2(eOipv4addr_t remIP, yarp::os::Searchable &cfgtotal) = 0;
64 virtual bool close() = 0;
65
66
67 virtual const Properties & getProperties() = 0;
68
69
70 virtual const void * getUDPtransmit(eOipv4addressing_t &destination, size_t &sizeofpacket, uint16_t &numofrops) = 0;
71
72 virtual bool processRXpacket(const void *data, const size_t size) = 0;
73
74 virtual bool getRemoteValue(const eOprotID32_t id32, void *value, const double timeout = 0.100, const unsigned int retries = 0) = 0;
75
76 virtual bool getRemoteValues(const std::vector<eOprotID32_t> &id32s, const std::vector<void*> &values, const double timeout = 0.500) = 0;
77
78 virtual bool setRemoteValue(const eOprotID32_t id32, void *value) = 0;
79
80 virtual bool setcheckRemoteValue(const eOprotID32_t id32, void *value, const unsigned int retries = 10, const double waitbeforecheck = 0.001, const double timeout = 0.050) = 0;
81
82 virtual bool getLocalValue(const eOprotID32_t id32, void *value) = 0;
83
84 virtual bool setLocalValue(eOprotID32_t id32, const void *value, bool overrideROprotection = false) = 0;
85
86 virtual bool verifyEPprotocol(eOprot_endpoint_t ep) = 0;
87
88 virtual bool CANPrintHandler(eOmn_info_basic_t* infobasic) = 0;
89
90 virtual bool serviceVerifyActivate(eOmn_serv_category_t category, const eOmn_serv_parameter_t* param, double timeout = 0.500) = 0;
91
92 virtual bool serviceSetRegulars(eOmn_serv_category_t category, vector<eOprotID32_t> &id32vector, double timeout = 0.500) = 0;
93
94 virtual bool serviceStart(eOmn_serv_category_t category, double timeout = 0.500) = 0;
95
96 virtual bool serviceStop(eOmn_serv_category_t category, double timeout = 0.500) = 0;
97
98 virtual bool Tick() = 0;
99 virtual bool Check() = 0;
100
101 virtual bool isFake() = 0;
102
104
105 };
106
107} // namespace eth
108
109
110#endif // include-guard
111
112
113// - end-of-file (leave a blank line after)----------------------------------------------------------------------------
114
115
116
117
118
119
120
@ data
virtual bool isFake()=0
virtual bool setcheckRemoteValue(const eOprotID32_t id32, void *value, const unsigned int retries=10, const double waitbeforecheck=0.001, const double timeout=0.050)=0
virtual bool close()=0
virtual const void * getUDPtransmit(eOipv4addressing_t &destination, size_t &sizeofpacket, uint16_t &numofrops)=0
virtual bool serviceVerifyActivate(eOmn_serv_category_t category, const eOmn_serv_parameter_t *param, double timeout=0.500)=0
virtual bool Tick()=0
virtual HostTransceiver * getTransceiver()=0
virtual const Properties & getProperties()=0
virtual bool setRemoteValue(const eOprotID32_t id32, void *value)=0
virtual bool verifyEPprotocol(eOprot_endpoint_t ep)=0
virtual bool getLocalValue(const eOprotID32_t id32, void *value)=0
virtual bool setLocalValue(eOprotID32_t id32, const void *value, bool overrideROprotection=false)=0
virtual bool serviceStop(eOmn_serv_category_t category, double timeout=0.500)=0
virtual bool serviceSetRegulars(eOmn_serv_category_t category, vector< eOprotID32_t > &id32vector, double timeout=0.500)=0
virtual bool processRXpacket(const void *data, const size_t size)=0
virtual bool serviceStart(eOmn_serv_category_t category, double timeout=0.500)=0
virtual bool getRemoteValue(const eOprotID32_t id32, void *value, const double timeout=0.100, const unsigned int retries=0)=0
virtual bool getRemoteValues(const std::vector< eOprotID32_t > &id32s, const std::vector< void * > &values, const double timeout=0.500)=0
virtual bool CANPrintHandler(eOmn_info_basic_t *infobasic)=0
virtual bool Check()=0
virtual bool open2(eOipv4addr_t remIP, yarp::os::Searchable &cfgtotal)=0