ET System
16.4
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/time.h>
#include "et_private.h"
#include "et_network.h"
int etr_alive | ( | et_sys_id | id | ) |
References et_id_t::debug, ET_DEBUG_ERROR, et_logmsg(), ET_NET_ALIVE, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_alive().
References ET_NET_ATT_DUMP.
Referenced by et_attach_geteventsdump().
References ET_NET_ATT_GET.
Referenced by et_attach_geteventsget().
References ET_NET_ATT_MAKE.
Referenced by et_attach_geteventsmake().
References ET_NET_ATT_PUT.
Referenced by et_attach_geteventsput().
int etr_close | ( | et_sys_id | id | ) |
References et_id_t::debug, ET_DEBUG_ERROR, et_id_destroy(), et_logmsg(), ET_NET_CLOSE, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_close().
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_EV_DUMP, ET_OK, et_tcp_lock(), et_tcp_unlock(), et_event_t::modify, et_event_t::pdata, et_event_t::place, and et_id_t::sockfd.
Referenced by et_event_dump().
int etr_event_get | ( | et_sys_id | id, |
et_att_id | att, | ||
et_event ** | ev, | ||
int | mode, | ||
struct timespec * | deltatime | ||
) |
References et_id_t::bit64, et_event_t::byteorder, et_event_t::control, et_event_t::datastatus, et_id_t::debug, ET_64BIT_UINT, ET_DATA_MASK, ET_DATA_SHIFT, ET_DEBUG_ERROR, ET_DUMP, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_TIMEOUT, ET_ERROR_WRITE, et_init_event(), et_logmsg(), ET_MODIFY, ET_MODIFY_HEADER, ET_NET_EV_GET, ET_OK, ET_PRIORITY_MASK, ET_SLEEP, ET_STATION_SELECT_INTS, et_tcp_lock(), et_tcp_unlock(), ET_TIMED, ET_WAIT_MASK, et_event_t::length, et_event_t::memsize, et_event_t::modify, et_event_t::pdata, et_event_t::place, et_event_t::priority, and et_id_t::sockfd.
Referenced by et_event_get().
int etr_event_new | ( | et_sys_id | id, |
et_att_id | att, | ||
et_event ** | ev, | ||
int | mode, | ||
struct timespec * | deltatime, | ||
size_t | size | ||
) |
References et_id_t::bit64, et_id_t::debug, et_id_t::esize, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_TIMEOUT, ET_ERROR_WRITE, ET_EVENT_TEMP, ET_HIGHINT, et_init_event(), et_logmsg(), ET_LOWINT, ET_MODIFY, ET_NET_EV_NEW, ET_NOALLOC, ET_OK, ET_SLEEP, et_tcp_lock(), et_tcp_unlock(), ET_TIMED, ET_WAIT_MASK, et_event_t::length, et_event_t::memsize, et_event_t::modify, et_event_t::owner, et_event_t::pdata, et_event_t::place, et_id_t::sockfd, and et_event_t::temp.
Referenced by et_event_new().
References et_event_t::byteorder, et_event_t::control, et_event_t::datastatus, et_id_t::debug, ET_DATA_SHIFT, ET_DEBUG_ERROR, ET_ERROR, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_WRITE, ET_HIGHINT, et_logmsg(), ET_LOWINT, ET_MODIFY, ET_NET_EV_PUT, ET_NOALLOC, ET_OK, ET_STATION_SELECT_INTS, et_tcp_lock(), et_tcp_unlock(), et_event_t::length, et_event_t::memsize, et_event_t::modify, et_event_t::owner, et_event_t::pdata, et_event_t::place, et_event_t::priority, and et_id_t::sockfd.
Referenced by et_event_put().
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_WRITE, et_logmsg(), ET_NET_EVS_DUMP, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_events_dump().
int etr_events_get | ( | et_sys_id | id, |
et_att_id | att, | ||
et_event * | evs[], | ||
int | mode, | ||
struct timespec * | deltatime, | ||
int | num, | ||
int * | nread | ||
) |
References et_id_t::bit64, et_event_t::byteorder, et_event_t::control, et_event_t::datastatus, et_id_t::debug, ET_64BIT_UINT, ET_DATA_MASK, ET_DATA_SHIFT, ET_DEBUG_ERROR, ET_DUMP, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_TIMEOUT, ET_ERROR_WRITE, et_init_event(), et_logmsg(), ET_MODIFY, ET_MODIFY_HEADER, ET_NET_EVS_GET, ET_OK, ET_PRIORITY_MASK, ET_SLEEP, ET_STATION_SELECT_INTS, et_tcp_lock(), et_tcp_unlock(), ET_TIMED, ET_WAIT_MASK, et_event_t::length, et_event_t::memsize, et_event_t::modify, et_event_t::place, et_event_t::priority, and et_id_t::sockfd.
Referenced by et_events_get().
int etr_events_new | ( | et_sys_id | id, |
et_att_id | att, | ||
et_event * | evs[], | ||
int | mode, | ||
struct timespec * | deltatime, | ||
size_t | size, | ||
int | num, | ||
int * | nread | ||
) |
References et_id_t::bit64, et_id_t::debug, et_id_t::esize, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_TIMEOUT, ET_ERROR_WRITE, ET_EVENT_NORMAL, ET_EVENT_TEMP, ET_HIGHINT, et_init_event(), et_logmsg(), ET_LOWINT, ET_MODIFY, ET_NET_EVS_NEW, ET_NOALLOC, ET_OK, ET_SLEEP, et_tcp_lock(), et_tcp_unlock(), ET_TIMED, ET_WAIT_MASK, et_event_t::length, et_event_t::memsize, et_event_t::modify, et_event_t::owner, et_event_t::place, et_id_t::sockfd, and et_event_t::temp.
Referenced by et_events_new().
int etr_events_new_group | ( | et_sys_id | id, |
et_att_id | att, | ||
et_event * | evs[], | ||
int | mode, | ||
struct timespec * | deltatime, | ||
size_t | size, | ||
int | num, | ||
int | group, | ||
int * | nread | ||
) |
References et_id_t::bit64, et_id_t::debug, et_id_t::esize, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_TIMEOUT, ET_ERROR_WRITE, ET_EVENT_NORMAL, ET_EVENT_TEMP, ET_HIGHINT, et_init_event(), et_logmsg(), ET_LOWINT, ET_MODIFY, ET_NET_EVS_NEW_GRP, ET_NOALLOC, ET_OK, ET_SLEEP, et_tcp_lock(), et_tcp_unlock(), ET_TIMED, ET_WAIT_MASK, et_event_t::length, et_event_t::memsize, et_event_t::modify, et_event_t::owner, et_event_t::place, et_id_t::sockfd, and et_event_t::temp.
Referenced by et_events_new_group().
References et_event_t::byteorder, et_id_t::debug, ET_DATA_SHIFT, ET_DEBUG_ERROR, ET_ERROR, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_WRITE, ET_HIGHINT, et_logmsg(), ET_LOWINT, ET_MODIFY, ET_NET_EVS_PUT, ET_NOALLOC, ET_OK, ET_STATION_SELECT_INTS, et_tcp_lock(), et_tcp_unlock(), et_event_t::length, et_event_t::pdata, and et_id_t::sockfd.
Referenced by et_events_put().
int etr_forcedclose | ( | et_sys_id | id | ) |
References et_id_t::debug, ET_DEBUG_ERROR, et_id_destroy(), et_logmsg(), ET_NET_FCLOSE, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_forcedclose().
int etr_kill | ( | et_sys_id | id | ) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_WRITE, et_id_destroy(), et_logmsg(), ET_NET_KILL, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_kill().
int etr_open | ( | et_sys_id * | id, |
const char * | et_filename, | ||
et_openconfig | openconfig | ||
) |
References et_open_config_t::cast, et_open_config_t::debug_default, ET_64BIT_UINT, ET_DEBUG_ERROR, ET_DEBUG_INFO, ET_DIRECT, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_TIMEOUT, ET_ERROR_TOOMANY, ET_ERROR_WRITE, et_findserver(), et_freeAnswers(), ET_HOST_LOCAL, ET_IOV_MAX, et_logmsg(), ET_MAGIC_INT1, ET_MAGIC_INT2, ET_MAGIC_INT3, ET_MAXHOSTNAMELEN, ET_OK, ET_OPEN_NOWAIT, et_orderIpAddrs(), ET_REMOTE, et_open_config_t::host, et_open_config_t::interface, et_open_config_t::netinfo, et_open_config_t::serverport, et_open_config_t::tcpNoDelay, et_open_config_t::tcpRecvBufSize, et_open_config_t::tcpSendBufSize, et_open_config_t::timeout, and et_open_config_t::wait.
Referenced by et_open().
int etr_station_attach | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
et_att_id * | att | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_DEBUG_WARN, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_WRITE, ET_IPADDRSTRLEN, et_logmsg(), ET_MAXHOSTNAMELEN, ET_NET_STAT_ATT, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_attach().
int etr_station_create | ( | et_sys_id | id, |
et_stat_id * | stat_id, | ||
const char * | stat_name, | ||
et_statconfig | sconfig | ||
) |
References ET_END, and etr_station_create_at().
int etr_station_create_at | ( | et_sys_id | id, |
et_stat_id * | stat_id, | ||
const char * | stat_name, | ||
et_statconfig | sconfig, | ||
int | position, | ||
int | parallelposition | ||
) |
References et_stat_config_t::block_mode, et_stat_config_t::classs, et_stat_config_t::cue, et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_EXISTS, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_CRAT, ET_OK, ET_STATION_SELECT_INTS, et_tcp_lock(), et_tcp_unlock(), et_stat_config_t::flow_mode, et_stat_config_t::fname, et_stat_config_t::init, et_stat_config_t::lib, et_stat_config_t::prescale, et_stat_config_t::restore_mode, et_stat_config_t::select, et_stat_config_t::select_mode, et_id_t::sockfd, and et_stat_config_t::user_mode.
Referenced by et_station_create_at(), and etr_station_create().
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_DET, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_detach().
int etr_station_exists | ( | et_sys_id | id, |
et_stat_id * | stat_id, | ||
const char * | stat_name | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_REMOTE, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_EX, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_exists().
int etr_station_getattachments | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | numatts | ||
) |
References ET_NET_STAT_GATTS.
Referenced by et_station_getattachments().
int etr_station_getblock | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | block | ||
) |
References ET_NET_STAT_GBLOCK.
Referenced by et_station_getblock().
int etr_station_getclass | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
char * | classs | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, ET_FILENAME_LENGTH, et_logmsg(), ET_NET_STAT_CLASS, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_getclass().
int etr_station_getcue | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | cue | ||
) |
References ET_NET_STAT_GCUE.
Referenced by et_station_getcue().
int etr_station_getfunction | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
char * | function | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, ET_FUNCNAME_LENGTH, et_logmsg(), ET_NET_STAT_FUNC, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_getfunction().
int etr_station_getinputcount | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | cnt | ||
) |
References ET_NET_STAT_INCNT.
Referenced by et_station_getinputcount().
int etr_station_getlib | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
char * | lib | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, ET_FILENAME_LENGTH, et_logmsg(), ET_NET_STAT_LIB, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_getlib().
int etr_station_getoutputcount | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | cnt | ||
) |
References ET_NET_STAT_OUTCNT.
Referenced by et_station_getoutputcount().
int etr_station_getposition | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | position, | ||
int * | parallelposition | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_GPOS, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_getposition().
int etr_station_getprescale | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | prescale | ||
) |
References ET_NET_STAT_GPRE.
Referenced by et_station_getprescale().
int etr_station_getrestore | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | restore | ||
) |
References ET_NET_STAT_GRESTORE.
Referenced by et_station_getrestore().
int etr_station_getselect | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | select | ||
) |
References ET_NET_STAT_GSELECT.
Referenced by et_station_getselect().
int etr_station_getselectwords | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int | select[] | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_GSW, ET_OK, ET_STATION_SELECT_INTS, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_getselectwords().
int etr_station_getstatus | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | status | ||
) |
References ET_NET_STAT_STATUS.
Referenced by et_station_getstatus().
int etr_station_getuser | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int * | user | ||
) |
References ET_NET_STAT_GUSER.
Referenced by et_station_getuser().
int etr_station_isattached | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
et_att_id | att | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_ISAT, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_isattached().
int etr_station_remove | ( | et_sys_id | id, |
et_stat_id | stat_id | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_RM, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_remove().
int etr_station_setblock | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int | block | ||
) |
References ET_NET_STAT_SBLOCK.
Referenced by et_station_setblock().
int etr_station_setcue | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int | cue | ||
) |
References ET_NET_STAT_SCUE.
Referenced by et_station_setcue().
int etr_station_setposition | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int | position, | ||
int | parallelposition | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_SPOS, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_setposition().
int etr_station_setprescale | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int | prescale | ||
) |
References ET_NET_STAT_SPRE.
Referenced by et_station_setprescale().
int etr_station_setrestore | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int | restore | ||
) |
References ET_NET_STAT_SRESTORE.
Referenced by et_station_setrestore().
int etr_station_setselectwords | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int | select[] | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_STAT_SSW, ET_STATION_SELECT_INTS, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_station_setselectwords().
int etr_station_setuser | ( | et_sys_id | id, |
et_stat_id | stat_id, | ||
int | user | ||
) |
References ET_NET_STAT_SUSER.
Referenced by et_station_setuser().
int etr_system_getattachments | ( | et_sys_id | id, |
int * | atts | ||
) |
References ET_NET_SYS_ATT.
Referenced by et_system_getattachments().
int etr_system_getattsmax | ( | et_sys_id | id, |
int * | attsmax | ||
) |
References ET_NET_SYS_ATTMAX.
Referenced by et_system_getattsmax().
int etr_system_getgroupcount | ( | et_sys_id | id, |
int * | groupCnt | ||
) |
References ET_NET_SYS_GRP.
Referenced by et_system_setgroup().
int etr_system_getheartbeat | ( | et_sys_id | id, |
int * | heartbeat | ||
) |
References ET_NET_SYS_HBEAT.
Referenced by et_system_getheartbeat().
int etr_system_getpid | ( | et_sys_id | id, |
int * | pid | ||
) |
References ET_NET_SYS_PID.
Referenced by et_system_getpid().
int etr_system_getprocs | ( | et_sys_id | id, |
int * | procs | ||
) |
References ET_NET_SYS_PROC.
Referenced by et_system_getprocs().
int etr_system_getprocsmax | ( | et_sys_id | id, |
int * | procsmax | ||
) |
References ET_NET_SYS_PROCMAX.
Referenced by et_system_getprocsmax().
int etr_system_getstations | ( | et_sys_id | id, |
int * | stations | ||
) |
References ET_NET_SYS_STAT.
Referenced by et_system_getstations().
int etr_system_getstationsmax | ( | et_sys_id | id, |
int * | stationsmax | ||
) |
References ET_NET_SYS_STATMAX.
Referenced by et_system_getstationsmax().
int etr_system_gettemps | ( | et_sys_id | id, |
int * | temps | ||
) |
References ET_NET_SYS_TMP.
Referenced by et_system_gettemps().
int etr_system_gettempsmax | ( | et_sys_id | id, |
int * | tempsmax | ||
) |
References ET_NET_SYS_TMPMAX.
Referenced by et_system_gettempsmax().
int etr_wait_for_alive | ( | et_sys_id | id | ) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_READ, ET_ERROR_WRITE, et_logmsg(), ET_NET_WAIT, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_wait_for_alive().
int etr_wakeup_all | ( | et_sys_id | id, |
et_stat_id | stat_id | ||
) |
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_WRITE, et_logmsg(), ET_NET_WAKE_ALL, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_wakeup_all().
References et_id_t::debug, ET_DEBUG_ERROR, ET_ERROR_WRITE, et_logmsg(), ET_NET_WAKE_ATT, ET_OK, et_tcp_lock(), et_tcp_unlock(), and et_id_t::sockfd.
Referenced by et_wakeup_attachment().