/** $Workfile: ct020000.h $ $Revision: 2.5 $ $Date: 11 Aug 1993 13:40:42 $ Description: include file for TransPort system C-ToolKit function declarations to be used for a Small model C program $Log: C:\pvcs\logfiles\ct020000.h_v $ Rev 2.5 11 Aug 1993 13:40:42 RGG changed mod_cfg_get() to mod_cfg_read() changed mod_cfg_put() to mod_cfg_write() added ct_commandwaitloop (unsigned long) changed mod_model() to mod_model_read() added mod_model_get() to get the module type from the module changed read_d_mod() and read_m_mod() to use 'void *' instead of 'ulong *' changed writ_d_mod() to use 'void *' instead of 'ulong' changed mod_latch_clr() to use 'void *' instead of 'ulong' added sendoptomuxcommand() Rev 2.4 04 Jan 1993 14:44:28 RGG eliminated need for memory model specific INCLUDE files Rev 2.3 22 Sep 1992 17:18:20 RGG added function to get C-Tool Kit version Rev 2.2 14 Mar 1991 8:59:56 RGG eliminated iop_cmd_set_time() & iop_cmd_init() functions added iiop_scanlist() function to retrieve the system scan list Rev 2.1 06 Mar 1991 14:52:20 RGG converted INTs to SHORTs changed read_d_mod() & mod_latch_clr() to use unsigned long instead of signed long Rev 2.0 29 Aug 1990 11:27:52 RGG Initial revision. **/ #ifndef TPT_CT_System /* file already included ? */ #define TPT_CT_System /* if not, make sure it is not */ /*****************************************************************************/ /* the following defines the current version of this file. */ /* */ /*****************************************************************************/ #define TPT_CT_System_File_Version 0x0205 /* version 2.05 */ /*****************************************************************************/ /* */ /* include the low-level file for the system definitions */ /* */ /*****************************************************************************/ #include /*****************************************************************************/ /* */ /*****************************************************************************/ #define CTK_Type_Analog 'a' #define CTK_Type_Digital 'd' #define CTK_Type_Input 'i' #define CTK_Type_Output 'o' #define CTK_Type_Mixed 'm' #define CTK_Type_IOPBoard 'b' #define OMB_PassThrough 0 // send/get optomux command/response #define OMB_SetTimeOut 1 // set the device response timeout #define OMS_NotDone 0 // optomux command/response not done #define OMS_Done 1 // optomux command/response done #define OMS_NoCommand 2 // no optomux command in process #define OMS_TimeOut 3 // no response received #define OMS_OverRun 4 // too many bytes received #define OMS_HardwareError 5 // hardware cannot transmit #define VAL_Max_DataBytes 240 // maximum OPTO command size /*****************************************************************************/ /* */ /* this section defines the C-Tool Kit functions used to interface to */ /* the DPR from the PCAT, VME Corp, RadiSys, XYCOM interfaces */ /* */ /*****************************************************************************/ /*****************************************************************************/ /* Functions returning strings */ /*****************************************************************************/ char *error_str(short errornumber, short shortmess); char *mod_model_str(short modulemodel); char *iiop_mode_str(short mode); /*****************************************************************************/ /* Functions returning DPR offsets. */ /*****************************************************************************/ unsigned short offset_io(short modaddress, short channel, short anadig, short inOut, short mixed); unsigned short offset_latch(short modaddress, short channel); unsigned short offset_monitor(short modaddress, short channel); unsigned short offset_status(short modaddress); unsigned short offset_chantype(short modaddress); /*****************************************************************************/ /* Functions for analog I/O */ /*****************************************************************************/ short read_a_mod(short board, short module, short *data, short inout); short writ_a_mod(short board, short module, short *data, short inout); short read_a_chan(short board, short module, short channel, short *data, short inout); short writ_a_chan(short board, short module, short channel, short data, short inout); short read_peak_mod(short board, short module, short *data); short read_valy_mod(short board, short module, short *data); short read_peak_chan(short board, short module, short channel, short *data); short read_valy_chan(short board, short module, short channel, short *data); short reset_peak_mod(short board, short module); short reset_valy_mod(short board, short module); short reset_peak_chan(short board, short module, short channel); short reset_valy_chan(short board, short module, short channel); /*****************************************************************************/ /* Functions for digital I/O */ /*****************************************************************************/ short read_d_mod(short board, short module, void *data, short inout); short read_m_mod(short board, short module, void *data); short read_d_chan(short board, short module, short channel, short *data, short inout); short writ_d_mod(short board, short module, void *data, short inout); short writ_d_chan(short board, short module, short channel, short data, short inout); short read_cnt_mod(short board, short module, short *data); short read_cnt_chan(short board, short module, short channel, short *data); short reset_cnt_mod(short board, short module, short *data); short reset_cnt_chan(short board, short module, short channel, short *data); /*****************************************************************************/ /* Functions for reading monitors */ /*****************************************************************************/ short read_m_chan(short board, short module, short channel, short *data); //short read_m_mod(short board, short module, short *data); /*****************************************************************************/ /* Misc 'channel' operations */ /*****************************************************************************/ short chan_quan(short board, short module, short *chanquan, short anadig, short inout); short chan_latch_clr(short board, short module, short channel); /*****************************************************************************/ /* Misc 'module' operations */ /*****************************************************************************/ short mod_stat_read(short board, short module); short mod_stat_get(short board, short module); short mod_restart(short board, short module); short mod_soft_rev(short board, short module, short *modrev, short *baserev); short mod_model_read(short board, short module, short *typeptr); short mod_model_get(short board, short module, short *typeptr); short mod_cfg_read(short board, short module, unsigned char *config); short mod_cfg_write(short board, short module, unsigned char *config); short mod_latch_clr(short board, short module, void *latch); short mod_chan_type(short board, short module, short *chantype); short mod_mixed(short board, short module, short *mixed); /*****************************************************************************/ /* Miscellaneous system operations */ /*****************************************************************************/ short iop_soft_rev(short board, short *revmm, short *revch); short iop_cmd(short board, void *command, void *response); short stream_check(short board, short *streamon); short scan_done(short board, short *isdone); short iiop_mode_cntrl(short board, short mode); short iiop_mode_check(short board, short *mode); short iiop_status(short board); void getctlibversion(short *version, unsigned char *date); short sendoptomuxcmd(short board, short module, char *cmd, char *rsp, short *status); short setoptomuxtimeout(short board, short module, unsigned short timeout); /*****************************************************************************/ /* Configuration operations */ /*****************************************************************************/ short system_start(short board, char *file, short mode); short cfg_file_address(char *file, short *memaddress, short *port); short load_IIOP_from_file(short board, char *file); short iiop_scanlist(short board, char *scanlist); #endif /* end of 'TPT_CT_System' */