/*==============================================================================
 ***CMS**=C_INC
 *
 * Abs:  Message service function codes.  This file is the common source for 
 *       VAX & micro "C" code.
 *
 * Name: SLCTXT:MSGFUNC.HC
 *
 * Prev: None
 *
 * Auth: R. Sass  2-Jul-1990 Converted from msgfunc.txt for micro access 
 *                           from "C". Added definition for new fast
 *                           feedback (FBCK). I didn't use SDL beacuse
 *                           there was no existing msgfunc.sdl & it doesn't 
 *                           generate hex when that's what I want.
 *
 *------------------------------------------------------------------------------
 *
 * Mod:
 * 15-Aug-2005, K. Luchini   Add FUNC_CODE mask
 * 06-Aug-1998, R. MacKenzie Add PROXY_DISABLE_CONN and PROXY_ENABLE_CONN 
 * 26-Nov-1996, R. MacKenzie Add Add FUNC_PROXY
 *  8-oct-1996, rgj          add klxmsg
 * 01-Oct-1996, K. Underwood Add FUNC_ANLG
 * 19-Jan-1996, T. Gromme    Add CAMV_MBCDMAPL.
 * 19-Dec-1995, R. Sass/E. Siskind
 *                           Add FUNC_DIAG for micro/Multibus diagnostics.
 * 02-JUN-1995, L. Yasukawa  Add FUNC_BCOM for new BITBUS network.
 * 24-FEB-1995, K. Underwood Add TEST error meter reset function.
 * 01-Feb-1994, T. Lahey     Add FUNC_PM for pseudo micros special functions.
 * 23-Jun-1993  K. Krauter   Rename FUNC_DIAG to FUNC_MD86, Add FUNC_MCOM
 * 05-Feb-1993, S. Allison   Add MICRREQ_MPSC_CAMAC_VERIFY and 
 *                               MICRREQ_CRAT_CAMAC_CONFIG.
 * 20-Jan-1993, R. Sass      Add FUNC_MICRREQ_FORWARD_MMR
 * 03-Dec-1992, R. Sass      Add FUNC_MICRREQ_SEND_ALLTIMEDATA
 * 28-Aug-1992, T. Gromme    Delete FIDG, CATT, CART, BID.
 * 28-Aug-1992, K. Underwood Change FUNC_MPSC.
 * 08-Aug-1991, S. Allison   Add FUNC_MPSC for new MPS functions.        
 * 24-Jul-1990, K. Krauter   Add FUNC_DIAG for KISnet communication diags.
 *
 *============================================================================*/
 
 
#ifndef MSGFUNC_HC  /* guard macro */
#define MSGFUNC_HC  /* guard macro */

#define FUNC_CODE        0x00ff
#define RESPONSE         0x8000
#define TERSE            0x0080
#define ERR_CODE         0x0001
#define TEXT_CODE        0x0002
#define SUMM_CODE        0x0003
#define ALARM_ERR_CODE   0x0004
 
/* Functions about which the message service knows */
 
#define FUNC_BPMO        0x0100       /* BPM */
#define FUNC_MGNT        0x0200       /* Magnet */
#define FUNC_KLYS        0x0300       /* Klystron */
#define FUNC_STAT        0x0400       /* Status */
#define FUNC_FBCK        0x0500       /* Fast Feedback */
#define FUNC_TIMING      0x0600       /* Time */
#define FUNC_CAMV        0x0700       /* Virtual CAMAC */
#define FUNC_MPG         0x0800       /* Master Pattern Generator */
#define FUNC_CRAT        0x0900       /* Crate */
#define FUNC_FDBK        0x0A00       /* Old fast feedback */
#define FUNC_PM          0x0B00       /* Pseudomicro-specific (eg. PC) */
#define FUNC_ANLG        0x0D00       /* analog status job */
#define FUNC_MICRREQ     0x0E00
#define FUNC_VEREX       0x0F00
#define FUNC_IMAGEN      0x1000
#define FUNC_MPS         0x1100       /* MPS2 = FB88 */
#define FUNC_MPSC        0x1200       /* New Machine Protection */
#define FUNC_DB          0x1300       /* Database */
#define FUNC_MICRO       0x1400       /* MICROENTRY = MICROMAIN = BASICMAIN */
#define FUNC_BCOM        0x1500       /* BCOM (BITBUS) job */
#define FUNC_DIAG        0x1600       /* DIAG Micro Diagnostic job */
#define FUNC_TEST        0x1900       /* Simple existence tests. */
#define FUNC_MCOM        0x1A00       /* kisnet diagnostics */
#define FUNC_MSGFWD      0x1B00       /* not a subjob, but port MSGMAIN uses */
#define FUNC_MSG         0x1C00
#define FUNC_NET         0x1E00
#define FUNC_MD86        0x1F00
#define FUNC_PROXY       0x2000       /* not used at all by iRMX micro */
/* functions codes higher than 0x1F are reserved for dynamic allocation */
 
/* Other task specific function codes are found in xxxxFUNC include files */
 
#define CRAT_NETT_ECHO       (FUNC_CRAT+1)
#define CRAT_VEREX           (FUNC_CRAT+5)
#define CRAT_VETO_DIAG_PREP  (FUNC_CRAT+6)
#define CRAT_VETO_DIAG_PROC  (FUNC_CRAT+7)
#define CRAT_VETO_UPDATE     (FUNC_CRAT+8)
#define CRAT_VETO_CIRC_READ  (FUNC_CRAT+9)
#define CRAT_PNET_GET_CTRS   (FUNC_CRAT+11)
#define CRAT_MBCDEX_CTRL     (FUNC_CRAT+15)
#define CRAT_PDU_REINIT      (FUNC_CRAT+18)
 
#define CAMV_EXIT            (FUNC_CAMV+1)
#define CAMV_CAMAC           (FUNC_CAMV+2)
#define CAMV_CAMAC_R         (FUNC_CAMV+3)
#define CAMV_MBCDMAPL        (FUNC_CAMV+4)
#define CAMV_MBCDDIAG        (FUNC_CAMV+5)
#define CAMV_GPIBxINI        (FUNC_CAMV+10)
#define CAMV_GPIBxPUT        (FUNC_CAMV+11)
#define CAMV_GPIBxGET        (FUNC_CAMV+12)
#define CAMV_GPIBxPFM        (FUNC_CAMV+20)
#define CAMV_GPIBxPFM_CAM    (FUNC_CAMV+21)
 
#define MPS2_UPLOADBUGGERLIST (FUNC_MPS+2)
#define MPS2_DNLOADBUGGERLIST (FUNC_MPS+3)
 
#define MICRREQ_SEND_PDUDATA       (FUNC_MICRREQ+1)
#define MICRREQ_SEND_PAUDATA       (FUNC_MICRREQ+2)
#define MICRREQ_SEND_PSUDATA       (FUNC_MICRREQ+3)
#define MICRREQ_SEND_PAUDATA_NOZ   (FUNC_MICRREQ+4)
#define MICRREQ_SEND_ALLTIMEDATA   (FUNC_MICRREQ+5)
#define MICRREQ_FORWARD_MMR        (FUNC_MICRREQ+6)
#define MICRREQ_MPSC_CAMAC_VERIFY  (FUNC_MICRREQ+7)
#define MICRREQ_CRAT_CAMAC_CONFIG  (FUNC_MICRREQ+8)
#define MICRREQ_IMALIVE            (FUNC_MICRREQ+9)
#define MICRREQ_DODERR             (FUNC_MICRREQ+16)
#define MICRREQ_DIDERR             (FUNC_MICRREQ+17)
#define MICRREQ_KLXMSG             (FUNC_MICRREQ+18)

#define IMAGEN_REQUEST       (FUNC_IMAGEN+1)
 
#define TEST_ECHO            (FUNC_TEST+1)     /* Echo data verbatim.       */
#define TEST_ECHO_MWORD      (FUNC_TEST+2)     /* Echo block of repetitions */
                                               /*  of given word.           */
#define TEST_ERR_METER_RESET (FUNC_TEST+3)     /* Reset error metering      */

#define MSG_MAIL_WAIT        (FUNC_MSG+1)
#define MSG_IOC_SLCNOTIFY    (FUNC_MSG+2)      /* for the slcIOC */
 

#define PROXY_FORWARD        (FUNC_PROXY+1)
#define PROXY_KEEPALIVE      (FUNC_PROXY+2)
#define PROXY_DISABLE_CONN   (FUNC_PROXY+3)/* disable all conns except current*/
#define PROXY_ENABLE_CONN    (FUNC_PROXY+4)/* enable all conns data flow      */

#endif  /* MSGFUNC_HC guard macro */
