iCub-main
FeatureInterface.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 iCub Facility, Istituto Italiano di Tecnologia
3  * Author: Alberto Cardellino, Marco Accame
4  * email: alberto.cardellino@iit.it, marco.accame@iit.it
5  * CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
6  *
7  */
8 
9 // - include guard ----------------------------------------------------------------------------------------------------
10 
11 #ifndef _FEATUREINTERFACE_H_
12 #define _FEATUREINTERFACE_H_
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 // -- this .h file can be included also by C modules. it provides interface to C++ classes by means of its functions.
19 // these c funtions are used inside the callbacks in reception of particular ROPs.
20 // for instance, function feat_signal_network_onsay() is used inside eoprot_fun_ONSAY_mc() to unlock the wait
21 // of embObjMotionControl.
22 
23 // - external dependencies --------------------------------------------------------------------------------------------
24 
25 #include "EoCommon.h"
26 #include "EoProtocol.h"
27 #include "EOYtheSystem.h"
28 
29 
30 // - public #define --------------------------------------------------------------------------------------------------
31 // empty-section
32 
33 
34 // - declaration of public user-defined types -------------------------------------------------------------------------
35 // empty-section
36 
37 // - declaration of extern public functions ---------------------------------------------------------------------------
38 
39 
40 void feat_Initialise(void *handleOfTheEthManager);
41 
42 void feat_DeInitialise();
43 
44 const eOysystem_cfg_t * feat_getSYSconfig();
45 
46 eObool_t feat_manage_motioncontrol_data(eOipv4addr_t ipv4, eOprotID32_t id32, void* rxdata);
47 
48 eObool_t feat_manage_motioncontrol_addinfo_multienc(eOipv4addr_t ipv4, eOprotID32_t id32, void* rxdata);
49 
50 eObool_t feat_manage_skin_data(eOipv4addr_t ipv4, eOprotID32_t id32, void *arrayofcandata);
51 
52 eObool_t feat_manage_analogsensors_data(eOipv4addr_t ipv4, eOprotID32_t id32, void *data);
53 
54 void * feat_MC_handler_get(eOipv4addr_t ipv4, eOprotID32_t id32);
55 
56 double feat_yarp_time_now(void);
57 
58 eObool_t feat_signal_network_onsay(eOipv4addr_t ipv4, eOprotID32_t id32, uint32_t signature);
59 
60 eObool_t feat_signal_network_onsig(eOipv4addr_t ipv4, eOprotID32_t id32, uint32_t signature);
61 
62 eObool_t feat_CANprint(eOipv4addr_t ipv4, eOmn_info_basic_t* infobasic);
63 
64 const char * feat_GetBoardName(eOipv4addr_t ipv4);
65 
66 void feat_PrintTrace(char *string);
67 
68 void feat_PrintDebug(char *string);
69 
70 void feat_PrintInfo(char *string);
71 
72 void feat_PrintWarning(char *string);
73 
74 void feat_PrintError(char *string);
75 
76 void feat_PrintFatal(char *string);
77 
78 void feat_manage_diagnostic(eOmn_info_basic_t* infobasic, uint8_t * extra, const EOnv* nv, const eOropdescriptor_t* rd);
79 
80 
81 void* ace_mutex_new(void);
82 
83 // returns 0 on success to take mutex, -3 on failure upon timeout, -2 on failure upon null pointer. m is pointer obtained w/ ace_mutex_new(), tout_usec is in microsec (no timeout is 0xffffffff).
84 int8_t ace_mutex_take(void* m, uint32_t tout_usec);
85 
86 // returns 0 on success to take mutex, -1 on genric failure of releasing mutex, -2 on failure upon null pointer. m is pointer obtained w/ ace_mutex_new(),
87 int8_t ace_mutex_release(void* m);
88 
89 void ace_mutex_delete(void* m);
90 
91 
92 
93 #ifdef __cplusplus
94 } // closing brace for extern "C"
95 #endif
96 
97 #endif // include-guard
98 
99 
100 // - end-of-file (leave a blank line after)----------------------------------------------------------------------------
101 
102 
103 
104 
105 
@ data
double feat_yarp_time_now(void)
eObool_t feat_signal_network_onsay(eOipv4addr_t ipv4, eOprotID32_t id32, uint32_t signature)
void feat_PrintFatal(char *string)
eObool_t feat_manage_motioncontrol_addinfo_multienc(eOipv4addr_t ipv4, eOprotID32_t id32, void *rxdata)
const eOysystem_cfg_t * feat_getSYSconfig()
void * ace_mutex_new(void)
int8_t ace_mutex_take(void *m, uint32_t tout_usec)
int8_t ace_mutex_release(void *m)
eObool_t feat_manage_skin_data(eOipv4addr_t ipv4, eOprotID32_t id32, void *arrayofcandata)
void feat_PrintTrace(char *string)
void feat_DeInitialise()
eObool_t feat_manage_analogsensors_data(eOipv4addr_t ipv4, eOprotID32_t id32, void *data)
eObool_t feat_CANprint(eOipv4addr_t ipv4, eOmn_info_basic_t *infobasic)
eObool_t feat_manage_motioncontrol_data(eOipv4addr_t ipv4, eOprotID32_t id32, void *rxdata)
void feat_manage_diagnostic(eOmn_info_basic_t *infobasic, uint8_t *extra, const EOnv *nv, const eOropdescriptor_t *rd)
void * feat_MC_handler_get(eOipv4addr_t ipv4, eOprotID32_t id32)
void feat_PrintDebug(char *string)
const char * feat_GetBoardName(eOipv4addr_t ipv4)
void feat_PrintInfo(char *string)
void feat_PrintError(char *string)
eObool_t feat_signal_network_onsig(eOipv4addr_t ipv4, eOprotID32_t id32, uint32_t signature)
void feat_Initialise(void *handleOfTheEthManager)
void ace_mutex_delete(void *m)
void feat_PrintWarning(char *string)