123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- /*****************************************************************************/
- /******************* Siemens Medizinische Technik Erlangen *******************/
- /*****************************************************************************/
- /* */
- /* File name: axnglobaldefines.h Version: 1.0 */
- /* */
- /*****************************************************************************/
- /* */
- /* Type: Headerfile Programming language: C++ */
- /* */
- /*****************************************************************************/
- /* */
- /* Author: Ulrich Koestner Date: 01.09.1997 */
- /* */
- /* Changes: */
- /* */
- /* Date | Name | Method | CC-Gen */
- /* ---------+---------------------+------------------------------+---------- */
- /* 19.09.01 | Daum | AXN_ERRLOG_1015 added | */
- /* 09.10.01 | Daum | changed defines for AXN_ERROR| */
- /* | | and AXN_OK under Nto | */
- /* 12.06.03 | Hoffmann | debug levels and group | */
- /* | | for err_info. | */
- /* 30.06.03 | Hoffmann | back to 200 from 500 in mbx | */
- /* | | size. | */
- /* 29.07.03 | Hoffmann | specpial ACS_VB10_GROUP bit | */
- /* | | added. | */
- /* 29.10.03 | Hoffmann | New defines for the clean up | */
- /* | | thread of an entry of the | */
- /* | | socket connection tab added. | */
- /* 06.11.03 | Hoffmann | set AXN_MBX_CL_HELP_NAME_LENGTH| */
- /* | | to 20 to be sure we have | */
- /* | | enough space. | */
- /* 12.11.03 | Hoffmann | many defines moved to | */
- /* | | axnerrinfo.h | */
- /* 10.08.05 | Fischer | reduced broadcast interval | */
- /* 08.09.05 | Fischer | moved AXN_MAX_NUM_VIRTUAL_ | */
- /* | | CONNECTIONS to axnalivetab.h | */
- /* | | and updated other defines for| */
- /* | | internal/external connections| */
- /* | | and maximal number of flags | */
- /* 27.09.05 | Fischer | removed defines for ack objs | */
- /* | | (not used with XCS2) | */
- /* 28.09.05 | Fischer | added a define for an unde- | */
- /* | | fined group_index | */
- /* 14.12.05 | Fischer | added an important warning | */
- /* 13.06.08 | Koestner | global definitions received | */
- /* | | from axnclientrecv.h | */
- /* | | | */
- /* */
- /*****************************************************************************/
- /* */
- /* Description: */
- /* ============ */
- /* This file includes the global defines */
- /* This file have to be included after axn_portab.h */
- /*****************************************************************************/
- /* */
- /* Includes: */
- /* ========= */
- /* */
- /* */
- /*****************************************************************************/
- /* */
- /* Copyright (c) Siemens AG 1997. All rights reserved */
- /* */
- /*****************************************************************************/
- /* */
- /* */
- /* */
- #ifndef AXNGLOBALDEFINES_H
- #define AXNGLOBALDEFINES_H
- //include "mas.h"
- #include "..//gbl/axcscom.h"
- //#ifdef AXN_NEUTRINO
- //#include "..//gbl/rfcglobal.h" //donn't have this header file
- #include "..//gbl/axnportab.h"
- //#endif // defined AXN_NEUTRINO
- // Defines and Systemwide Types for The AXCS Net Software
- /*****************************************************************************/
- /*****************************************************************************/
- /*****************************************************************************/
- /*** Common System Defines ***/
- /*****************************************************************************/
- typedef axn_int axn_status ;
- #ifdef AXN_NEUTRINO
- #define AXN_OK (axn_status)RFC_OK
- #define AXN_ERROR (axn_status)RFC_ERROR
- #else
- #define AXN_OK (axn_status)0
- #define AXN_ERROR (axn_status)-1
- #endif // defined AXN_NEUTRINO
- #define AXN_ERR_TIMEOUT (axn_status)-2
- typedef axn_byte axn_bool ;
- #define AXN_TRUE (axn_bool)-1
- #define AXN_FALSE (axn_bool)0
- #ifndef NULL
- #define NULL 0
- #endif
- #define AXN_NULL_PTR ((axn_char *) 0)
- // a value for initialization of the group_index
- #define AXN_UNDEFINED_GROUP_INDEX 0
- //
- // Typedefs for nto socket specific data
- //
- typedef axn_int axn_socket ;
- typedef short axn_port ;
- typedef axn_int axn_ip_address ;
- #define AXN_TCP_SOCKET (axn_int)1
- #define AXN_UDP_SOCKET (axn_int)2
- #define AXN_TCP_PORT (axn_port)5002
- #define AXN_UDP_PORT (axn_port)5003
- /*****************************************************************************/
- /*****************************************************************************/
- /*****************************************************************************/
- /*** System Wide Limitations ***/
- /*****************************************************************************/
- /*****************************************************************************/
- /*** maximum number of client application processes ***/
- /*****************************************************************************/
- // DON'T USE VALUES BIGGER THAN 255 ! (this would have fatal consequences)
- #define AXN_MIN_CLIENT_ID ((axn_byte)1)
- #define AXN_MAX_CLIENT_ID ((axn_byte)255)
- #define AXN_MAX_NR_CLIENTS ((axn_byte)AXN_MAX_CLIENT_ID - AXN_MIN_CLIENT_ID + 1)
- #define AXN_MAX_NR_INTERNAL_CONNECTIONS AXN_MAX_NR_CLIENTS
- /*****************************************************************************/
- /*** maximum number of axcs server hosts ***/
- /*****************************************************************************/
- // DON'T USE VALUES BIGGER THAN 255 ! (this would have fatal consequences)
- #define AXN_MIN_SERVER_ID ((axn_byte)1)
- #define AXN_MAX_SERVER_ID ((axn_byte)254)
- #define AXN_MAX_NR_SERVER ((axn_byte)32)
- #define AXN_MAX_NR_EXTERNAL_CONNECTIONS ((axn_byte)AXN_MAX_NR_SERVER - 1)
- /*****************************************************************************/
- /*** maximum number of maiblox entries ***/
- /*****************************************************************************/
- #define AXN_MAX_NUM_SERVER_MBX 500
- #define AXN_MAX_NUM_CLIENT_MBX 200
- #define AXN_MAX_NUM_SOCKET_SEND_MBX 200
- #define AXN_MAX_NUM_CLEANUP_MBX 500*20 // from 100, 19.12.02 Hoffmann/Koestner
- // message queue defines
- #define MSG_LENGTH 1024
- // flag defines
- #define AXN_FLAGSIZE 4
- #define AXN_MAX_NR_LOCALFLAGS AXN_MAX_NR_CLIENTS
- #define AXN_FLAG_SET 1
- #define AXN_FLAG_RESET 0
- #define AXN_FLAG_INVALID -1
- /*****************************************************************************/
- /*****************************************************************************/
- /*****************************************************************************/
- /*** System Resource Names ***/
- /*****************************************************************************/
- #define AXN_SERVER_MBX_NAME "/axn_server_mbx"
- #define AXN_CLEAN_UP_MBX_NAME "/axn_clean_up_mbx"
- //#define BROADCAST_INI_FILE "broadcast.ini"
- // common defines
- #define MAX_RESOURCE_NAME_LENGTH 32
- //location of a client or server
- #define AXN_LOCATION_UNKNOWN (axn_location) 10
- #define AXN_LOCATION_EXTERNAL (axn_location) 11
- #define AXN_LOCATION_INTERNAL (axn_location) 12
- #define AXN_LOCATION_INTERNAL_OR_EXTERNAL (axn_location) 13
- // first part of name for ClientRecv-mailbox
- #define RECV_MBX_NAME "/axn_client%02x"
- // first part of name for SocketSend-mailbox
- #define AXN_SOCKET_SEND_MBX_NAME "/axn_socket%02x"
- // first part of name for ClientRecv-aliveflag
- #define CLIENT_ALIVE_FLAG_NAME "/axn_aliveflag%02x"
- // first part of name for the socket send aliveflag
- #define SOCKET_SEND_ALIVE_FLAG_NAME "/axn_sosendflag%02x"
- // first part of name for the socket recv aliveflag
- #define SOCKET_RECV_ALIVE_FLAG_NAME "/axn_sorecvflag%02x"
- // first part of name for the object-already-sent-flag
- #define SOCKET_OBJ_SINCE_VT_FLAG_NAME "/axn_soobjssvtflag%02x"
- // first part of name for the object-already-sent-flag
- #define CLIENT_OBJ_SINCE_VT_FLAG_NAME "/axn_clobjssvtflag%02x"
- // restarting threads
- #define AXN_INTERNAL_MODE_RESTART 0x0F
- #define AXN_RESTART_BROADCASTRECV 1
- #define AXN_RESTART_BROADCASTSEND 2
- #define AXN_RESTART_SOCKETSERVER 3
- // mode for testing
- #define ACS_MODE_TEST 0x20
- // NIL
- #define AXN_BNIL (axn_byte) 0xFF
- #define AXN_INIL (axn_int) 0x80000000
- #define AXN_WNIL (axn_word) 0xFFFF
- /****************************************************************************
- times for alivecheck, sending dummys, timeout msgqueue-recv
- ****************************************************************************/
- #define AXN_ALIVE_BASE_RATE_IN_NS 100000000 // PZ - 100 ms - DZ - 100 ms - PZ
- #define AXN_BROADCAST_INTERVAL_IN_MS 2000
- #define AXN_CLIENT_DUMMY_SEND_COUNTER 5
- #define AXN_SOCKET_DUMMY_SEND_COUNTER 20
- #define AXN_DUMMYTIME_BASE_RATE_IN_NS 2*AXN_ALIVE_BASE_RATE_IN_NS
- #define AXN_TIMEOUT_RECOGNITION 2
- #define AXN_NO_TIMEOUT 0
- #define AXN_SERVER_SEND_POSSIBLE_DELAY 500
- /****************************************************************************
- global defines moved from axnclienrecv.h
- ****************************************************************************/
- #define AXN_ERR_TIMEOUT (axn_status)-2
- #define AXN_FLAG_TIMEOUT 2
- #define AXN_DUMMYTIME_BASE_RATE_IN_MS 200
- // TURN_OFF
- typedef struct turn_off_t_tag
- {
- turn_off_t1 t1;
- turn_off_t2 t2[NO_OBJECTS_MAX];
- } turn_off_type;
- #endif
|