iCub-main
EoProtocolSK_fun_userdef.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
3  * Author: Valentina Gaggero
4  * email: valentina.gaggero@iit.it
5  * website: www.robotcub.org
6  * Permission is granted to copy, distribute, and/or modify this program
7  * under the terms of the GNU General Public License, version 2 or any
8  * later version published by the Free Software Foundation.
9  *
10  * A copy of the license can be found at
11  * http://www.robotcub.org/icub/license/gpl.txt
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details
17  */
18 
19 
20 /* @file EOProtocolSK_fun_userdef.c
21  @brief This file keeps callbacks used for SK protocol in icub-main
22  @author marco.accame@iit.it
23  @date 22 mar 2016
24 **/
25 
26 
27 
28 // --------------------------------------------------------------------------------------------------------------------
29 // - external dependencies
30 // --------------------------------------------------------------------------------------------------------------------
31 
32 #include "EoCommon.h"
33 #include "EoCommon.h"
34 #include "EoProtocol.h"
35 #include "EOnv.h"
36 
37 #include "FeatureInterface.h"
38 
39 
40 // --------------------------------------------------------------------------------------------------------------------
41 // - declaration of extern public interface
42 // --------------------------------------------------------------------------------------------------------------------
43 
44 #include "EoProtocolSK.h"
45 
46 
47 // --------------------------------------------------------------------------------------------------------------------
48 // - #define with internal scope
49 // --------------------------------------------------------------------------------------------------------------------
50 // empty-section
51 
52 // --------------------------------------------------------------------------------------------------------------------
53 // - definition (and initialisation) of static variables
54 // --------------------------------------------------------------------------------------------------------------------
55 // empty-section
56 
57 
58 // --------------------------------------------------------------------------------------------------------------------
59 // - declaration of static functions
60 // --------------------------------------------------------------------------------------------------------------------
61 // empty-section
62 
63 
64 // --------------------------------------------------------------------------------------------------------------------
65 // - declaration of extern functions
66 // --------------------------------------------------------------------------------------------------------------------
67 
68 
69 extern void eoprot_fun_ONSAY_sk(const EOnv* nv, const eOropdescriptor_t* rd)
70 {
71  feat_signal_network_onsay(eo_nv_GetIP(nv), rd->id32, rd->signature);
72 }
73 
74 
75 extern void eoprot_fun_UPDT_sk_skin_status_arrayofcandata(const EOnv* nv, const eOropdescriptor_t* rd)
76 {
77  if(eo_ropcode_sig == rd->ropcode)
78  {
79  EOarray* arrayof = (EOarray*)rd->data;
80  uint8_t sizeofarray = eo_array_Size(arrayof);
81  if(0 != sizeofarray)
82  {
83  feat_manage_skin_data(eo_nv_GetIP(nv), rd->id32, (void *)arrayof);
84  }
85  }
86 }
87 
88 
89 // --------------------------------------------------------------------------------------------------------------------
90 // - end-of-file (leave a blank line after)
91 // --------------------------------------------------------------------------------------------------------------------
92 
93 
94 
95 
96 
97 
98 
void eoprot_fun_UPDT_sk_skin_status_arrayofcandata(const EOnv *nv, const eOropdescriptor_t *rd)
void eoprot_fun_ONSAY_sk(const EOnv *nv, const eOropdescriptor_t *rd)
eObool_t feat_signal_network_onsay(eOipv4addr_t ipv4, eOprotID32_t id32, uint32_t signature)
eObool_t feat_manage_skin_data(eOipv4addr_t ipv4, eOprotID32_t id32, void *arrayofcandata)