Data Structures | |
struct | kogmo_rtdb_connect_info_t |
Data Block for requesting a Database-Connection This is used only once for establishing the Database Connection. By using a struct, we can add more fields later. More... | |
Defines | |
#define | HAVE_DEFINED_setstatus |
#define | KOGMO_RTDB_CONNECT_FLAGS_NOHANDLERS 0x0001 |
Flags to modify RTDB Connections These have to be ORed and set to kogmo_rtdb_connect_info_t.flags or as argument to RTDBConn (). Please do not try other values! | |
#define | KOGMO_RTDB_CONNECT_FLAGS_TRYNOWAIT 0x0004 |
Normally, if there's no database to connect to, kogmo_rtdb_connect() just waits until it finds one. | |
#define | KOGMO_RTDB_CONNECT_FLAGS_SILENT 0x0008 |
Do not output error messages, useful in combination with TRYNOWAIT and LIVEONERR. | |
#define | KOGMO_RTDB_CONNECT_FLAGS_LIVEONERR 0x0010 |
Normally, if there are problems connecting to the database, your application terminates. | |
#define | KOGMO_RTDB_CONNECT_FLAGS_IMMEDIATELYDELETE 0x0020 |
If this process dies, immediately delete all its objects. | |
#define | KOGMO_RTDB_CONNECT_FLAGS_REALTIME 0x0100 |
(internal, ask matthias.goebl*goebl.net before use) | |
Functions | |
int | kogmo_rtdb_connect_initinfo (kogmo_rtdb_connect_info_t *conninfo, _const char *dbhost, _const char *procname, float cycletime) |
Init Info for a new Database Connection This does not connect. It's only for convenience. See kogmo_rtdb_connect_info_t. | |
kogmo_rtdb_objid_t | kogmo_rtdb_connect (kogmo_rtdb_handle_t **db_h, kogmo_rtdb_connect_info_t *conninfo) |
Open Connection to Real-time Vehicle Database. | |
int | kogmo_rtdb_disconnect (kogmo_rtdb_handle_t *db_h, void *discinfo) |
int | kogmo_rtdb_setstatus (kogmo_rtdb_handle_t *db_h, uint32_t status, _const char *msg, uint32_t flags) |
int | kogmo_rtdb_cycle_done (kogmo_rtdb_handle_t *db_h, uint32_t flags) |
int | kogmo_rtdb_pthread_create (kogmo_rtdb_handle_t *db_h, pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) |
int | kogmo_rtdb_pthread_kill (kogmo_rtdb_handle_t *db_h, pthread_t thread, int sig) |
int | kogmo_rtdb_pthread_join (kogmo_rtdb_handle_t *db_h, pthread_t thread, void **value_ptr) |
int | kogmo_rtdb_sleep_until (kogmo_rtdb_handle_t *db_h, _const kogmo_timestamp_t wakeup_ts) |
#define HAVE_DEFINED_setstatus |
Definition at line 784 of file kogmo_rtdb_funcs.h.
#define KOGMO_RTDB_CONNECT_FLAGS_IMMEDIATELYDELETE 0x0020 |
If this process dies, immediately delete all its objects.
Please use this only for processes that need much memory for raw data acquisition (and for the player).
Definition at line 349 of file kogmo_rtdb_types.h.
#define KOGMO_RTDB_CONNECT_FLAGS_LIVEONERR 0x0010 |
Normally, if there are problems connecting to the database, your application terminates.
By setting this flag your application just gets a negative return code for kogmo_rtdb_connect(), an lives on.
Definition at line 343 of file kogmo_rtdb_types.h.
#define KOGMO_RTDB_CONNECT_FLAGS_NOHANDLERS 0x0001 |
Flags to modify RTDB Connections These have to be ORed and set to kogmo_rtdb_connect_info_t.flags or as argument to RTDBConn (). Please do not try other values!
Normally, every process using the rtdb-libraries, will get signal-handlers to make sure that kogmo_rtdb_disconnect() is called at programm termination. By setting this flag you can prevent this, but PLEASE call kogmo_rtdb_disconnect(), otherwise the programms object won't get removed immediately.
Definition at line 326 of file kogmo_rtdb_types.h.
#define KOGMO_RTDB_CONNECT_FLAGS_REALTIME 0x0100 |
(internal, ask matthias.goebl*goebl.net before use)
Definition at line 353 of file kogmo_rtdb_types.h.
#define KOGMO_RTDB_CONNECT_FLAGS_SILENT 0x0008 |
Do not output error messages, useful in combination with TRYNOWAIT and LIVEONERR.
Definition at line 340 of file kogmo_rtdb_types.h.
#define KOGMO_RTDB_CONNECT_FLAGS_TRYNOWAIT 0x0004 |
Normally, if there's no database to connect to, kogmo_rtdb_connect() just waits until it finds one.
This way, you can start your applications before the database. By setting this flag kogmo_rtdb_connect() returns without waiting, if there's no database. Depending on KOGMO_RTDB_CONNECT_FLAGS_LIVEONERR your application terminates or gets a negative return code.
Definition at line 331 of file kogmo_rtdb_types.h.
kogmo_rtdb_objid_t kogmo_rtdb_connect | ( | kogmo_rtdb_handle_t ** | db_h, | |
kogmo_rtdb_connect_info_t * | conninfo | |||
) |
Open Connection to Real-time Vehicle Database.
db_h | storage for the new database handle | |
conninfo | connection parameters and process infos |
Please note:
int kogmo_rtdb_connect_initinfo | ( | kogmo_rtdb_connect_info_t * | conninfo, | |
_const char * | dbhost, | |||
_const char * | procname, | |||
float | cycletime | |||
) |
Init Info for a new Database Connection This does not connect. It's only for convenience. See kogmo_rtdb_connect_info_t.
conninfo | pointer to a Database Connection Info | |
dbhost | database specifier, "" for the local default database, not more than 25 characters | |
procname | choosen name, like a2_roadtracker | |
cycletime | your internal cycle time in seconds (0 for system default); you must signal your vitality every cycle with kogmo_rtdb_cycle_done() |
int kogmo_rtdb_cycle_done | ( | kogmo_rtdb_handle_t * | db_h, | |
uint32_t | flags | |||
) |
int kogmo_rtdb_disconnect | ( | kogmo_rtdb_handle_t * | db_h, | |
void * | discinfo | |||
) |
int kogmo_rtdb_pthread_create | ( | kogmo_rtdb_handle_t * | db_h, | |
pthread_t * | thread, | |||
pthread_attr_t * | attr, | |||
void *(*)(void *) | start_routine, | |||
void * | arg | |||
) |
int kogmo_rtdb_pthread_join | ( | kogmo_rtdb_handle_t * | db_h, | |
pthread_t | thread, | |||
void ** | value_ptr | |||
) |
int kogmo_rtdb_pthread_kill | ( | kogmo_rtdb_handle_t * | db_h, | |
pthread_t | thread, | |||
int | sig | |||
) |
int kogmo_rtdb_setstatus | ( | kogmo_rtdb_handle_t * | db_h, | |
uint32_t | status, | |||
_const char * | msg, | |||
uint32_t | flags | |||
) |
int kogmo_rtdb_sleep_until | ( | kogmo_rtdb_handle_t * | db_h, | |
_const kogmo_timestamp_t | wakeup_ts | |||
) |