ARB
|
#include <netdb.h>
#include <netinet/tcp.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <unistd.h>
#include <cstdarg>
#include <arb_cs.h>
#include "client_privat.h"
#include "client.h"
#include "trace.h"
Go to the source code of this file.
Classes | |
struct | client_msg_queue |
Macros | |
#define | aisc_assert(cond) arb_assert(cond) |
#define | AISC_MAGIC_NUMBER_FILTER 0xffffff00 |
#define | CORE() |
#define | ERRBUF_SIZE 300 |
#define | PRTERR(msg) if (aisc_print_error_to_stderr) fprintf(stderr, "%s: %s\n", msg, link->error); |
Variables | |
static const char * | err_connection_problems = "CONNECTION PROBLEMS" |
int | aisc_core_on_error = 1 |
aisc_com * | aisc_client_link |
static int | aisc_print_error_to_stderr = 1 |
static char | errbuf [ERRBUF_SIZE] |
#define aisc_assert | ( | cond | ) | arb_assert(cond) |
Definition at line 26 of file client.c.
Referenced by aisc_collect_sets(), aisc_create(), aisc_debug_info(), aisc_get(), aisc_nput(), aisc_open(), aisc_put(), and part_of().
#define AISC_MAGIC_NUMBER_FILTER 0xffffff00 |
Definition at line 30 of file client.c.
Referenced by aisc_check_error().
#define CORE | ( | ) |
Definition at line 36 of file client.c.
Referenced by aisc_collect_sets(), aisc_create(), aisc_debug_info(), and aisc_get().
#define ERRBUF_SIZE 300 |
Definition at line 47 of file client.c.
Referenced by aisc_check_error().
#define PRTERR | ( | msg | ) | if (aisc_print_error_to_stderr) fprintf(stderr, "%s: %s\n", msg, link->error); |
Definition at line 50 of file client.c.
Referenced by aisc_add_message_queue(), aisc_check_error(), aisc_collect_sets(), aisc_create(), aisc_debug_info(), aisc_get(), aisc_init_client(), aisc_nput(), aisc_open(), and aisc_put().
Definition at line 56 of file client.c.
References aisc_com::aisc_client_bytes_first, aisc_com::aisc_client_bytes_last, aisc_bytes_list::data, aisc_bytes_list::next, and aisc_bytes_list::size.
Referenced by aisc_collect_sets().
Definition at line 74 of file client.c.
References aisc_com::aisc_client_bytes_first, aisc_com::aisc_client_bytes_last, arb_socket_write(), aisc_bytes_list::data, aisc_bytes_list::next, NULp, aisc_bytes_list::size, and aisc_com::socket.
Referenced by aisc_create(), aisc_nput(), and aisc_put().
Definition at line 96 of file client.c.
References arb_socket_read(), buffer, err_connection_problems, aisc_com::error, client_msg_queue::message, aisc_com::message_queue, client_msg_queue::message_type, client_msg_queue::next, PRTERR, and aisc_com::socket.
Referenced by aisc_check_error().
Definition at line 121 of file client.c.
References aisc_add_message_queue(), AISC_CCOM_ERROR, AISC_CCOM_MESSAGE, AISC_CCOM_OK, AISC_MAGIC_NUMBER_FILTER, aisc_com::aisc_mes_buffer, AISC_MESSAGE_BUFFER_LEN, arb_socket_read(), err_connection_problems, errbuf, ERRBUF_SIZE, aisc_com::error, length, aisc_com::magic, NULp, PRTERR, and aisc_com::socket.
Referenced by aisc_create(), aisc_debug_info(), aisc_get(), aisc_init_client(), and aisc_put().
Definition at line 187 of file client.c.
References aisc_check_error(), AISC_INIT, aisc_com::aisc_mes_buffer, arb_socket_write(), err_connection_problems, aisc_com::error, aisc_com::magic, PRTERR, and aisc_com::socket.
Referenced by aisc_open().
|
static |
Definition at line 201 of file client.c.
Referenced by aisc_close(), and aisc_open().
aisc_com* aisc_open | ( | const char * | path, |
AISC_Object & | main_obj, | ||
long | magic, | ||
GB_ERROR * | error | ||
) |
Definition at line 205 of file client.c.
References aisc_assert, aisc_com::aisc_client_bytes_first, aisc_free_link(), aisc_init_client(), arb_open_socket(), AISC_Object::clear(), AISC_Object::exists(), AISC_Object::init(), link, NULp, and PRTERR.
Referenced by arb_look_and_kill_server(), ARB_main(), arb_wait_for_server(), NameServerConnection::connect(), MO_Liste::get_all_species(), Sonde::get_matching_species(), probe_design_event(), probe_match_event(), PTserverConnection::PTserverConnection(), and run_command().
int aisc_close | ( | aisc_com * | link, |
AISC_Object & | object | ||
) |
Definition at line 249 of file client.c.
References aisc_free_link(), aisc_com::aisc_mes_buffer, arb_socket_write(), and aisc_com::socket.
Referenced by arb_look_and_kill_server(), arb_look_and_start_server(), ARB_main(), NameServerConnection::disconnect(), MO_Liste::get_all_species(), Sonde::get_matching_species(), probe_design_event(), probe_match_event(), run_command(), and PTserverConnection::~PTserverConnection().
int aisc_get | ( | aisc_com * | link, |
int | o_type, | ||
const AISC_Object & | object, | ||
... | |||
) |
Definition at line 266 of file client.c.
References aisc_assert, AISC_ATTR_MASK, aisc_check_error(), AISC_DUMP, AISC_DUMP_SEP, AISC_GET, aisc_get(), AISC_MAX_ATTR, aisc_com::aisc_mes_buffer, AISC_OBJ_TYPE_MASK, AISC_TYPE_BYTES, AISC_TYPE_COMMON, AISC_TYPE_DOUBLE, AISC_TYPE_INT, AISC_TYPE_STRING, AISC_VAR_TYPE_MASK, arb_socket_read(), arb_socket_write(), CORE, err_connection_problems, errbuf, aisc_com::error, long, aisc_com::magic, MAX_AISC_SET_GET, PRTERR, aisc_com::socket, type, va_end(), and va_start().
Referenced by aisc_get(), AP_dump_index_event(), AP_probe_design_event(), AP_probe_iterate_event(), AP_probe_match_event(), ARB_main(), AWTC_generate_one_name(), AWTC_pars_names(), AWTC_recreate_name(), ALI_PT::find_family(), MO_Liste::get_all_species(), Sonde::get_matching_species(), probe_design_event(), and probe_match_event().
long* aisc_debug_info | ( | aisc_com * | link, |
int | o_type, | ||
const AISC_Object & | object, | ||
int | attribute | ||
) |
Definition at line 384 of file client.c.
References aisc_assert, aisc_check_error(), AISC_DEBUG_INFO, AISC_MAX_ATTR, aisc_com::aisc_mes_buffer, AISC_OBJ_TYPE_MASK, arb_socket_write(), CORE, err_connection_problems, aisc_com::error, aisc_com::magic, NULp, PRTERR, aisc_com::socket, and type.
Definition at line 418 of file client.c.
References aisc_assert, and copy().
Referenced by aisc_collect_sets().
|
static |
Definition at line 437 of file client.c.
References aisc_assert, AISC_ATTR_MASK, aisc_c_add_to_bytes_queue(), AISC_DUMP, AISC_DUMP_SEP, AISC_INDEX, AISC_MAX_ATTR, AISC_MAX_STRING_LEN, aisc_com::aisc_mes_buffer, AISC_OBJ_TYPE_MASK, AISC_TYPE_BYTES, AISC_TYPE_COMMON, AISC_TYPE_DOUBLE, AISC_TYPE_INT, AISC_TYPE_STRING, AISC_VAR_TYPE_MASK, double_xfer::as_double, double_xfer::as_int, CORE, bytestring::data, errbuf, aisc_com::error, MAX_AISC_SET_GET, part_of(), PRTERR, bytestring::size, and type.
Referenced by aisc_create(), aisc_nput(), and aisc_put().
int aisc_put | ( | aisc_com * | link, |
int | o_type, | ||
const AISC_Object & | object, | ||
... | |||
) |
Definition at line 539 of file client.c.
References aisc_assert, aisc_c_send_bytes_queue(), aisc_check_error(), aisc_collect_sets(), aisc_com::aisc_mes_buffer, AISC_SET, arb_socket_write(), err_connection_problems, aisc_com::error, aisc_com::magic, PRTERR, aisc_com::socket, type, and va_start().
Referenced by AP_dump_index_event(), AP_probe_design_event(), AP_probe_iterate_event(), MO_Liste::get_all_species(), Sonde::get_matching_species(), probe_common_send_data(), probe_design_event(), probe_design_send_data(), and probe_match_send_data().
int aisc_nput | ( | aisc_com * | link, |
int | o_type, | ||
const AISC_Object & | object, | ||
... | |||
) |
Definition at line 564 of file client.c.
References aisc_assert, aisc_c_send_bytes_queue(), aisc_collect_sets(), aisc_com::aisc_mes_buffer, AISC_NSET, arb_socket_write(), err_connection_problems, aisc_com::error, aisc_com::magic, PRTERR, aisc_com::socket, type, and va_start().
Referenced by AP_probe_match_event(), ARB_main(), AWTC_generate_one_name(), AWTC_pars_names(), AWTC_recreate_name(), probe_match_event(), and run_command().
int aisc_create | ( | aisc_com * | link, |
int | father_type, | ||
const AISC_Object & | father, | ||
int | attribute, | ||
int | object_type, | ||
AISC_Object & | object, | ||
... | |||
) |
Definition at line 593 of file client.c.
References aisc_assert, aisc_c_send_bytes_queue(), aisc_check_error(), aisc_collect_sets(), AISC_CREATE, aisc_com::aisc_mes_buffer, AISC_OBJ_TYPE_MASK, arb_socket_write(), CORE, err_connection_problems, aisc_com::error, AISC_Object::get(), aisc_com::magic, PRTERR, aisc_com::socket, AISC_Object::type(), type, and va_start().
Referenced by AP_probe_design_event(), AP_probe_iterate_event(), ARB_main(), ALI_PT::find_family(), init_local_com_struct(), MP_init_local_com_struct(), and probe_design_event().
|
static |
Definition at line 32 of file client.c.
Referenced by aisc_add_message_queue(), aisc_check_error(), aisc_create(), aisc_debug_info(), aisc_get(), aisc_init_client(), aisc_nput(), and aisc_put().
int aisc_core_on_error = 1 |
Definition at line 34 of file client.c.
Referenced by ARB_main().
|
static |
Definition at line 48 of file client.c.
Referenced by aisc_check_error(), aisc_collect_sets(), aisc_get(), and formatted().