|
MIDAS
|
#include "midas_c_compat.h"#include "midas.h"#include "mrpc.h"#include "msystem.h"#include <vector>#include <string>#include "string.h"#include "stdlib.h"#include "stdarg.h"#include "history.h"
Go to the source code of this file.
Functions | |
| void | c_free (void *mem) |
| void | c_free_list (void **mem_list, int arr_len) |
| INT | copy_string_to_c (std::string src, char *dest, DWORD dest_size) |
| template<class T > | |
| INT | copy_vector_to_c (std::vector< T > vec, void **dest, int &dest_len) |
| INT | copy_vector_string_to_c (std::vector< std::string > vec, char ***dest, int &dest_len) |
| INT | c_example_string_c_bufsize (char *buffer, DWORD buffer_size) |
| INT | c_example_string_c_alloc (char **dest) |
| INT | c_example_vector (void **dest, int &dest_len) |
| INT | c_example_string_vector (char ***dest, int &dest_len) |
| INT | c_al_trigger_alarm (const char *alarm_name, const char *alarm_message, const char *default_class, const char *cond_str, INT type) |
| INT | c_al_reset_alarm (const char *alarm_name) |
| INT | c_al_define_odb_alarm (const char *name, const char *condition, const char *aclass, const char *message) |
| INT | c_bm_flush_cache (INT buffer_handle, INT async_flag) |
| INT | c_bm_open_buffer (const char *buffer_name, INT buffer_size, INT *buffer_handle) |
| INT | c_bm_receive_event (INT buffer_handle, void *destination, INT *buf_size, INT async_flag) |
| INT | c_bm_remove_event_request (INT buffer_handle, INT request_id) |
| INT | c_bm_request_event (INT buffer_handle, short int event_id, short int trigger_mask, INT sampling_type, INT *request_id) |
| INT | c_cm_check_deferred_transition (void) |
| INT | c_cm_connect_client (const char *client_name, HNDLE *hConn) |
| INT | c_cm_connect_experiment (const char *host_name, const char *exp_name, const char *client_name, void(*func)(char *)) |
| INT | c_cm_deregister_transition (INT transition) |
| INT | c_cm_disconnect_client (HNDLE hConn, BOOL bShutdown) |
| INT | c_cm_disconnect_experiment () |
| INT | c_cm_exist (const char *name, BOOL bUnique) |
| INT | c_cm_get_environment (char *host_name, int host_name_size, char *exp_name, int exp_name_size) |
| INT | c_cm_get_experiment_database (HNDLE *hDB, HNDLE *hKeyClient) |
| INT | c_cm_get_path (char *path, int path_size) |
| const char * | c_cm_get_revision (void) |
| const char * | c_cm_get_version (void) |
| INT | c_cm_msg (INT message_type, const char *filename, INT line, const char *facility, const char *routine, const char *format,...) |
| INT | c_cm_msg_facilities (char ***dest, int &dest_len) |
| INT | c_cm_msg_register (EVENT_HANDLER *func) |
| INT | c_cm_msg_retrieve2 (const char *facility, uint64_t before, INT min_messages, char **messages, int *num_messages_read) |
| INT | c_cm_msg_open_buffer () |
| INT | c_cm_msg_close_buffer () |
| INT | c_cm_register_deferred_transition (INT transition, BOOL(*func)(INT, BOOL)) |
| INT | c_cm_register_function (INT id, INT(*func)(INT, void **)) |
| INT | c_cm_register_transition (INT transition, INT(*func)(INT, char *), int sequence_number) |
| INT | c_cm_set_transition_sequence (INT transition, INT sequence_number) |
| INT | c_cm_shutdown (const char *name, BOOL bUnique) |
| INT | c_cm_start_watchdog_thread (void) |
| INT | c_cm_stop_watchdog_thread (void) |
| INT | c_cm_transition (INT transition, INT run_number, char *error, INT strsize, INT async_flag, INT debug_flag) |
| INT | c_cm_yield (INT millisec) |
| INT | c_db_close_record (HNDLE hdb, HNDLE hkey) |
| INT | c_db_copy_json_ls (HNDLE hDB, HNDLE hKey, char **buffer, int *buffer_size, int *buffer_end) |
| INT | c_db_copy_json_save (HNDLE hDB, HNDLE hKey, char **buffer, int *buffer_size, int *buffer_end) |
| INT | c_db_create_key (HNDLE hdb, HNDLE key_handle, const char *key_name, DWORD type) |
| INT | c_db_create_link (HNDLE hdb, HNDLE key_handle, const char *link_name, const char *destination) |
| INT | c_db_delete_key (HNDLE database_handle, HNDLE key_handle) |
| INT | c_db_enum_key (HNDLE hDB, HNDLE hKey, INT idx, HNDLE *subkey_handle) |
| INT | c_db_enum_link (HNDLE hDB, HNDLE hKey, INT idx, HNDLE *subkey_handle) |
| INT | c_db_find_key (HNDLE hdb, HNDLE hkey, const char *name, HNDLE *hsubkey) |
| INT | c_db_find_link (HNDLE hDB, HNDLE hKey, const char *key_name, HNDLE *subhKey) |
| INT | c_db_get_key (HNDLE hdb, HNDLE key_handle, KEY *key) |
| INT | c_db_get_link_data (HNDLE hdb, HNDLE key_handle, void *data, INT *buf_size, DWORD type) |
| INT | c_db_get_parent (HNDLE hDB, HNDLE hKey, HNDLE *parenthKey) |
| INT | c_db_get_value (HNDLE hdb, HNDLE hKeyRoot, const char *key_name, void *data, INT *size, DWORD type, BOOL create) |
| INT | c_db_open_record (HNDLE hdb, HNDLE hkey, void *ptr, INT rec_size, WORD access, void(*dispatcher)(INT, INT, void *), void *info) |
| INT | c_db_rename_key (HNDLE hDB, HNDLE hKey, const char *name) |
| INT | c_db_reorder_key (HNDLE hDB, HNDLE hKey, INT index) |
| INT | c_db_resize_string (HNDLE hDB, HNDLE hKeyRoot, const char *key_name, int num_values, int max_string_size) |
| INT | c_db_set_link_data (HNDLE hdb, HNDLE key_handle, void *data, INT buf_size, int num_values, DWORD type) |
| INT | c_db_set_num_values (HNDLE hDB, HNDLE hKey, INT num_values) |
| INT | c_db_set_data (HNDLE hdb, HNDLE hKeyRoot, const void *data, INT size, INT num_values, DWORD type) |
| INT | c_db_set_value (HNDLE hdb, HNDLE hKeyRoot, const char *key_name, const void *data, INT size, INT num_values, DWORD type) |
| INT | c_db_set_value_index (HNDLE hDB, HNDLE hKeyRoot, const char *key_name, const void *data, INT data_size, INT index, DWORD type, BOOL truncate) |
| INT | c_db_unwatch (HNDLE hDB, HNDLE hKey) |
| INT | c_db_watch (HNDLE hDB, HNDLE hKey, void(*dispatcher)(INT, INT, INT, void *), void *info) |
| INT | c_jrpc_client_call (HNDLE hconn, char *cmd, char *args, char *buf, int buf_length) |
| INT | c_brpc_client_call (HNDLE hconn, char *cmd, char *args, char *buf, int &buf_length) |
| INT | c_rpc_flush_event (void) |
| INT | c_rpc_is_remote (void) |
| INT | c_rpc_send_event (INT buffer_handle, const EVENT_HEADER *event, INT buf_size, INT async_flag, INT mode) |
| INT | c_rpc_server_shutdown () |
| INT | c_ss_daemon_init (BOOL keep_stdout) |
| INT | c_ss_exec (char *cmd, INT *child_pid) |
| INT | c_ss_suspend_reset_server_acceptions () |
| INT | c_connect_history_if_needed (HNDLE hDB, bool debug=false) |
| INT | c_hs_get_events (HNDLE hDB, char ***dest, int &dest_len) |
| INT | c_hs_get_tags (HNDLE hDB, char *event_name, char ***dest_names, void **dest_types, void **dest_n_data, int &dest_len) |
| INT | c_hs_read (HNDLE hDB, uint32_t start_time, uint32_t end_time, uint32_t interval_secs, char *event_name, char *tag_name, int idx_start, int nvars, void **num_entries, void **times, void **values, void **hs_status) |
Variables | |
| MidasHistoryInterface * | mh = nullptr |
| INT c_al_define_odb_alarm | ( | const char * | name, |
| const char * | condition, | ||
| const char * | aclass, | ||
| const char * | message | ||
| ) |
Definition at line 179 of file midas_c_compat.cxx.

| INT c_al_reset_alarm | ( | const char * | alarm_name | ) |
Definition at line 175 of file midas_c_compat.cxx.

| INT c_al_trigger_alarm | ( | const char * | alarm_name, |
| const char * | alarm_message, | ||
| const char * | default_class, | ||
| const char * | cond_str, | ||
| INT | type | ||
| ) |
Definition at line 171 of file midas_c_compat.cxx.

Definition at line 183 of file midas_c_compat.cxx.

Definition at line 187 of file midas_c_compat.cxx.

Definition at line 191 of file midas_c_compat.cxx.

Definition at line 195 of file midas_c_compat.cxx.

| INT c_bm_request_event | ( | INT | buffer_handle, |
| short int | event_id, | ||
| short int | trigger_mask, | ||
| INT | sampling_type, | ||
| INT * | request_id | ||
| ) |
Definition at line 199 of file midas_c_compat.cxx.

Definition at line 453 of file midas_c_compat.cxx.

| INT c_cm_check_deferred_transition | ( | void | ) |
Definition at line 204 of file midas_c_compat.cxx.

Definition at line 208 of file midas_c_compat.cxx.

| INT c_cm_connect_experiment | ( | const char * | host_name, |
| const char * | exp_name, | ||
| const char * | client_name, | ||
| void(*)(char *) | func | ||
| ) |
Definition at line 212 of file midas_c_compat.cxx.

Definition at line 216 of file midas_c_compat.cxx.

Definition at line 220 of file midas_c_compat.cxx.

| INT c_cm_disconnect_experiment | ( | ) |
Definition at line 224 of file midas_c_compat.cxx.

Definition at line 228 of file midas_c_compat.cxx.

| INT c_cm_get_environment | ( | char * | host_name, |
| int | host_name_size, | ||
| char * | exp_name, | ||
| int | exp_name_size | ||
| ) |
Definition at line 232 of file midas_c_compat.cxx.

Definition at line 236 of file midas_c_compat.cxx.

| INT c_cm_get_path | ( | char * | path, |
| int | path_size | ||
| ) |
Definition at line 240 of file midas_c_compat.cxx.

| const char * c_cm_get_revision | ( | void | ) |
Definition at line 245 of file midas_c_compat.cxx.

| const char * c_cm_get_version | ( | void | ) |
Definition at line 251 of file midas_c_compat.cxx.

| INT c_cm_msg | ( | INT | message_type, |
| const char * | filename, | ||
| INT | line, | ||
| const char * | facility, | ||
| const char * | routine, | ||
| const char * | format, | ||
| ... | |||
| ) |
Definition at line 257 of file midas_c_compat.cxx.

| INT c_cm_msg_close_buffer | ( | ) |
Definition at line 306 of file midas_c_compat.cxx.

| INT c_cm_msg_facilities | ( | char *** | dest, |
| int & | dest_len | ||
| ) |
Definition at line 281 of file midas_c_compat.cxx.

| INT c_cm_msg_open_buffer | ( | ) |
Definition at line 302 of file midas_c_compat.cxx.

| INT c_cm_msg_register | ( | EVENT_HANDLER * | func | ) |
Definition at line 291 of file midas_c_compat.cxx.

| INT c_cm_msg_retrieve2 | ( | const char * | facility, |
| uint64_t | before, | ||
| INT | min_messages, | ||
| char ** | messages, | ||
| int * | num_messages_read | ||
| ) |
Definition at line 295 of file midas_c_compat.cxx.

Definition at line 310 of file midas_c_compat.cxx.

Definition at line 314 of file midas_c_compat.cxx.

Definition at line 318 of file midas_c_compat.cxx.

Definition at line 322 of file midas_c_compat.cxx.

Definition at line 326 of file midas_c_compat.cxx.

| INT c_cm_start_watchdog_thread | ( | void | ) |
Definition at line 330 of file midas_c_compat.cxx.

| INT c_cm_stop_watchdog_thread | ( | void | ) |
Definition at line 334 of file midas_c_compat.cxx.

| INT c_cm_transition | ( | INT | transition, |
| INT | run_number, | ||
| char * | error, | ||
| INT | strsize, | ||
| INT | async_flag, | ||
| INT | debug_flag | ||
| ) |
Definition at line 338 of file midas_c_compat.cxx.

Definition at line 342 of file midas_c_compat.cxx.

Definition at line 490 of file midas_c_compat.cxx.


Definition at line 346 of file midas_c_compat.cxx.

| INT c_db_copy_json_ls | ( | HNDLE | hDB, |
| HNDLE | hKey, | ||
| char ** | buffer, | ||
| int * | buffer_size, | ||
| int * | buffer_end | ||
| ) |
Definition at line 350 of file midas_c_compat.cxx.

| INT c_db_copy_json_save | ( | HNDLE | hDB, |
| HNDLE | hKey, | ||
| char ** | buffer, | ||
| int * | buffer_size, | ||
| int * | buffer_end | ||
| ) |
Definition at line 354 of file midas_c_compat.cxx.

Definition at line 358 of file midas_c_compat.cxx.

| INT c_db_create_link | ( | HNDLE | hdb, |
| HNDLE | key_handle, | ||
| const char * | link_name, | ||
| const char * | destination | ||
| ) |
Definition at line 362 of file midas_c_compat.cxx.

Definition at line 366 of file midas_c_compat.cxx.

Definition at line 370 of file midas_c_compat.cxx.

Definition at line 374 of file midas_c_compat.cxx.

Definition at line 378 of file midas_c_compat.cxx.

Definition at line 382 of file midas_c_compat.cxx.

Definition at line 386 of file midas_c_compat.cxx.

Definition at line 390 of file midas_c_compat.cxx.

Definition at line 394 of file midas_c_compat.cxx.

| INT c_db_get_value | ( | HNDLE | hdb, |
| HNDLE | hKeyRoot, | ||
| const char * | key_name, | ||
| void * | data, | ||
| INT * | size, | ||
| DWORD | type, | ||
| BOOL | create | ||
| ) |
Definition at line 398 of file midas_c_compat.cxx.

| INT c_db_open_record | ( | HNDLE | hdb, |
| HNDLE | hkey, | ||
| void * | ptr, | ||
| INT | rec_size, | ||
| WORD | access, | ||
| void(*)(INT, INT, void *) | dispatcher, | ||
| void * | info | ||
| ) |
Definition at line 402 of file midas_c_compat.cxx.

Definition at line 406 of file midas_c_compat.cxx.

Definition at line 410 of file midas_c_compat.cxx.

| INT c_db_resize_string | ( | HNDLE | hDB, |
| HNDLE | hKeyRoot, | ||
| const char * | key_name, | ||
| int | num_values, | ||
| int | max_string_size | ||
| ) |
Definition at line 414 of file midas_c_compat.cxx.

| INT c_db_set_data | ( | HNDLE | hdb, |
| HNDLE | hKeyRoot, | ||
| const void * | data, | ||
| INT | size, | ||
| INT | num_values, | ||
| DWORD | type | ||
| ) |
Definition at line 426 of file midas_c_compat.cxx.

| INT c_db_set_link_data | ( | HNDLE | hdb, |
| HNDLE | key_handle, | ||
| void * | data, | ||
| INT | buf_size, | ||
| int | num_values, | ||
| DWORD | type | ||
| ) |
Definition at line 418 of file midas_c_compat.cxx.

Definition at line 422 of file midas_c_compat.cxx.

| INT c_db_set_value | ( | HNDLE | hdb, |
| HNDLE | hKeyRoot, | ||
| const char * | key_name, | ||
| const void * | data, | ||
| INT | size, | ||
| INT | num_values, | ||
| DWORD | type | ||
| ) |
Definition at line 430 of file midas_c_compat.cxx.

| INT c_db_set_value_index | ( | HNDLE | hDB, |
| HNDLE | hKeyRoot, | ||
| const char * | key_name, | ||
| const void * | data, | ||
| INT | data_size, | ||
| INT | index, | ||
| DWORD | type, | ||
| BOOL | truncate | ||
| ) |
Definition at line 434 of file midas_c_compat.cxx.

Definition at line 438 of file midas_c_compat.cxx.

Definition at line 442 of file midas_c_compat.cxx.

| INT c_example_string_c_alloc | ( | char ** | dest | ) |
Definition at line 107 of file midas_c_compat.cxx.
Definition at line 89 of file midas_c_compat.cxx.

| INT c_example_string_vector | ( | char *** | dest, |
| int & | dest_len | ||
| ) |
Definition at line 163 of file midas_c_compat.cxx.

| INT c_example_vector | ( | void ** | dest, |
| int & | dest_len | ||
| ) |
Definition at line 134 of file midas_c_compat.cxx.

| void c_free | ( | void * | mem | ) |
Definition at line 18 of file midas_c_compat.cxx.
| void c_free_list | ( | void ** | mem_list, |
| int | arr_len | ||
| ) |
Definition at line 500 of file midas_c_compat.cxx.

| INT c_hs_get_tags | ( | HNDLE | hDB, |
| char * | event_name, | ||
| char *** | dest_names, | ||
| void ** | dest_types, | ||
| void ** | dest_n_data, | ||
| int & | dest_len | ||
| ) |
Definition at line 519 of file midas_c_compat.cxx.

| INT c_hs_read | ( | HNDLE | hDB, |
| uint32_t | start_time, | ||
| uint32_t | end_time, | ||
| uint32_t | interval_secs, | ||
| char * | event_name, | ||
| char * | tag_name, | ||
| int | idx_start, | ||
| int | nvars, | ||
| void ** | num_entries, | ||
| void ** | times, | ||
| void ** | values, | ||
| void ** | hs_status | ||
| ) |
Definition at line 550 of file midas_c_compat.cxx.

Definition at line 446 of file midas_c_compat.cxx.

| INT c_rpc_flush_event | ( | void | ) |
Definition at line 460 of file midas_c_compat.cxx.

| INT c_rpc_is_remote | ( | void | ) |
Definition at line 464 of file midas_c_compat.cxx.

| INT c_rpc_send_event | ( | INT | buffer_handle, |
| const EVENT_HEADER * | event, | ||
| INT | buf_size, | ||
| INT | async_flag, | ||
| INT | mode | ||
| ) |
Definition at line 468 of file midas_c_compat.cxx.

| INT c_rpc_server_shutdown | ( | ) |
Definition at line 472 of file midas_c_compat.cxx.

Definition at line 476 of file midas_c_compat.cxx.

Definition at line 480 of file midas_c_compat.cxx.

| INT c_ss_suspend_reset_server_acceptions | ( | ) |
Definition at line 484 of file midas_c_compat.cxx.

Definition at line 40 of file midas_c_compat.cxx.

| INT copy_vector_string_to_c | ( | std::vector< std::string > | vec, |
| char *** | dest, | ||
| int & | dest_len | ||
| ) |
Definition at line 67 of file midas_c_compat.cxx.

| INT copy_vector_to_c | ( | std::vector< T > | vec, |
| void ** | dest, | ||
| int & | dest_len | ||
| ) |
| MidasHistoryInterface* mh = nullptr |
Definition at line 488 of file midas_c_compat.cxx.