DCSModulesAPI  1.0.0
DCS sub project containing all the control modules as libraries.
Macros
exports.h File Reference

Go to the source code of this file.

Macros

#define DCS_REGISTER_CALL(...)
 Append this definition before function declarations to register it as a tcp connection callable. First param is the return type, the following params are argument types (if existent). More...
 
#define DCS_REGISTER_EVENT
 Append this definition before function declarations (or anywhere in the code) to register a tcp connection event. More...
 
#define DCS_API
 Defines the export interface acessible via the dll-interface. Only important for SHARED LIB Compile Mode.
 
#define DCS_INTERNAL_TEST
 Defines the export interface acessible via the dll-interface applicable for internal functions only. More...
 

Macro Definition Documentation

#define DCS_INTERNAL_TEST

Defines the export interface acessible via the dll-interface applicable for internal functions only.

This is used to expose certain internal features for testing, declarations with this specifier will not be exported to the final built shared library.

#define DCS_REGISTER_CALL (   ...)

Append this definition before function declarations to register it as a tcp connection callable. First param is the return type, the following params are argument types (if existent).

After running the DCS Preprocessor, integer codes (as well as macro definitions) should be generated for each function registered.

Note that the parameters name should be written in full, regardless of the current scope. See last example.

Examples:

void funcInt(int x);
void func();
int DCS::example_func(i8 val);
#define DCS_REGISTER_EVENT

Append this definition before function declarations (or anywhere in the code) to register a tcp connection event.

After running the DCS Preprocessor, integer codes should be generated for each event registered.

Examples:

void onData(int x);
void onData(int x)
{
// Emits the the SV_EVT_onData event, passing param x everytime the function onData is called.
DCS_EMIT_EVT((u8*)&x, sizeof(int));
}