iCub-main
Loading...
Searching...
No Matches
transceiverInterface.h
Go to the documentation of this file.
1/* Copyright (C) 2014 iCub Facility, Istituto Italiano di Tecnologia
2 * Author: Alberto Cardellino
3 * email: alberto.cardellino@iit.it
4 * Permission is granted to copy, distribute, and/or modify this program
5 * under the terms of the GNU General Public License, version 2 or any
6 * later version published by the Free Software Foundation.
7 *
8 * A copy of the license can be found at
9 * http://www.robotcub.org/icub/license/gpl.txt
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14 * Public License for more details
15 */
16
17
18// - include guard ----------------------------------------------------------------------------------------------------
19#ifndef _TRANSCEIVER_INTERFACE_H_
20#define _TRANSCEIVER_INTERFACE_H_
21
22
29class ITransceiver
30{
31public:
32 virtual ~ITransceiver(){}
33
34 // initialize the transceiver
35 virtual void init( uint32_t localipaddr, uint32_t remoteipaddr, uint16_t ipport, uint16_t pktsize, uint8_t borad_n) =0;
36
37 // Do something with the packet received from the socket
38 virtual void onMsgReception(uint8_t *data, uint16_t size) =0;
39
40
41 // get the whole packet to be transmitted
42 virtual void getTransmit(uint8_t **data, uint16_t *size) =0;
43} ;
44
45#endif // include-guard _TRANSCEIVER_INTERFACE_H_
46
47
48// - end-of-file (leave a blank line after)----------------------------------------------------------------------------
49
@ data
virtual void getTransmit(uint8_t **data, uint16_t *size)=0
virtual void init(uint32_t localipaddr, uint32_t remoteipaddr, uint16_t ipport, uint16_t pktsize, uint8_t borad_n)=0
virtual void onMsgReception(uint8_t *data, uint16_t size)=0