1 #ifndef CollectorInterface_H
2 #define CollectorInterface_H
8 #if defined(__cplusplus)
15 #error "No supported compiler found."
19 #define AC_EXPORT __attribute__((visibility("default")))
20 #define AC_CONSTRUCTOR __attribute__((constructor))
21 #define AC_DESTRUCTOR __attribute__((destructor))
22 #pragma GCC visibility push(hidden)
25 /* These two functions should be overloaded in all modules, but not exported under ANY circumstances. */
26 void AC_CONSTRUCTOR
AC_constructor();
27 void AC_DESTRUCTOR
AC_destructor();
29 uint16_t AC_EXPORT
AC_registerModuleInternal(const char *name
);
31 void AC_EXPORT
AC_writePacket(AC_DataPacket
*packet
);
32 AC_Timestamp AC_EXPORT
AC_timestamp();
33 uint8_t AC_EXPORT
AC_hasCollectionBegun();
34 AC_Address AC_EXPORT
AC_libraryOffset(const char *name
);
36 char AC_EXPORT
* AC_configurationString(const char *module
, const char *name
);
37 int AC_EXPORT
AC_configurationInt(const char *module
, const char *name
);
38 long AC_EXPORT
AC_configurationLong(const char *module
, const char *name
);
39 int AC_EXPORT
AC_configurationBool(const char *module
, const char *name
);
41 uint16_t AC_moduleID();
42 void AC_setModuleID(uint16_t moduleID
);
44 #define AC_moduleDefinition() \
45 static uint16_t AC_m_moduleID; \
46 uint16_t AC_moduleID() { return AC_m_moduleID; } \
47 void AC_setModuleID(uint16_t moduleID) { AC_m_moduleID = moduleID; }
49 #define AC_registerModule(name) \
50 AC_setModuleID(AC_registerModuleInternal(name))
53 #pragma GCC visibility pop
56 #if defined(__cplusplus)