clib_h
/*
** Copyright 1991-2009, Fermi Research Alliance, LLC. All rights reserved.
** $Id: clib.h,v 1.331 2013/04/29 20:03:26 hendricks Exp $
*/
/******************************************************************************/
/* clib.h
**
** This is a header file containing function prototypes for
** routines in the console library (CLIB).
**
** V0.0 B S Hendricks / Accelerator Controls 23-Jul-90
** Created
**
*/
/******************************************************************************/
#ifndef CLIB_DEFINED /* do this only once */
#define CLIB_DEFINED
#define CLIB_PRESENT
#include <signal.h>
#include <dirent.h>
#include <time.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include "cnsparam.h"
#include "cns_data_structs.h"
#include "fermilib.h"
#include <stdio.h>
#include <cmu.h>
#include <sar.h>
#include <string>
/******************************************************************************/
/*
** defined constants for argument values
*/
/******************************************************************************/
/*
** lxcurs ...
*/
#define LX_CURSOR_INIT 0 /* initialize Lexidata cursor */
#define LX_CURSOR_UPDATE 1 /* update Lexidata cursor */
#define LX_CURSOR_TERM 2 /* terminate Lexidata cursor */
/*
** lxcvec ...
*/
#define LX_CVEC_INIT 0 /* initialize chained vector */
#define LX_CVEC_ANOTHER 1 /* another endpoint in a previously initialized chained vector */
/*
** lxfill ...
*/
#define LX_POLY_FILL_INIT 0 /* initialize polygon fill */
#define LX_POLY_FILL_ANOTHER 1 /* another vertex in a previously initialized polygon */
/*
** lxmode ...
*/
#define LX_REPLACE 0 /* graphics screen replace mode */
#define LX_OR 1 /* graphics screen 'or' mode */
#define LX_AND 2 /* graphics screen 'and' mode */
#define LX_XOR 3 /* graphics screen exclusive 'or' mode */
/*
** lxrcmd ...
*/
#define LX_EMPTY 0 /* mode for empty circles and rectangles */
#define LX_FILLED 1 /* mode for filled circles and rectangles */
/*
** lxrst ...
*/
#define LX_HCMODE_DEFAULT 0 /* use actual colors for hard copy */
#define LX_HCMODE_REVERSED 1 /* reverse blue and yellow for copies */
/*
** lxcatt ...
*/
#define LX_TEXT_MINSIZ 1 /* minimum character size */
#define LX_TEXT_MAXSIZ 16 /* maximum character size */
#define LX_TEXT_LEFT_TO_RIGHT 0 /* normal left to right text */
#define LX_TEXT_UP 1 /* bottom to top text */
#define LX_TEXT_DOWN 2 /* top to bottom text */
#define LX_TEXT_RIGHT_TO_LEFT 3 /* right to left upside down text */
#define LX_TEXT_ERASIVE 0 /* text background is erased */
#define LX_TEXT_ADDITIVE 1 /* text background is not erased */
#define LX_TEXT_NORMAL 0 /* normal text */
#define LX_TEXT_INVERSE 1 /* inverse video text */
#define LX_MAX_TITLE_LEN 80 /* maximum length of an graphics window title */
/*
** lxbmov ...
*/
#define LX_MOVE_PIXELS 0 /* move pixels */
#define LX_COPY_PIXELS 1 /* copy pixels */
#define LX_TRANSFER_BKGD_PIXELS 0 /* transfer background pixels */
#define LX_IGNORE_BKGD_PIXELS 2 /* don't transfer background pixels */
/*
** Filesharing ...
*/
#define FSHARE_DIRECT 1
#define FSHARE_SEQUEN 2
#define FSHARE_SEQUENTIAL 2
#define FSHARE_APPEND 3
#define FSHARE_KEYED 4
#define FSHARE_READ 1
#define FSHARE_READ_ACCESS 1
#define FSHARE_WRITE 2
#define FSHARE_WRITE_ACCESS 2
#define FSHARE_SAVE 1
#define FSHARE_SUBMIT 4
#define FS_MAX_WRITE_COMMENT_LEN 80
/*
** datime ...
*/
#define DATIME_LEN 14
/*
** hscode ...
*/
#define HSCODE_NAME_TO_CODE 0 /* convert house name to code */
#define HSCODE_CODE_TO_NAME 1 /* convert house code to name */
/*
** clink routines ...
*/
#define COMPARE_DATE_LEN 19 /* length of a comparison date string */
#define ASCTIME_LEN 24 /* length of a date string from asctime or ctime */
#define DB_DATE_LEN 19 /* length of a database (Sybase) date string */
#define SLASH_DATE_LEN 19 /* length of a "slash" date string */
#define TRADITIONAL_DATE_LEN 26 /* length of a traditional date string */
#define DATE_NULL_TERMINATE 1 /* null terminate the resultant date string */
#define DATE_NO_SECONDS 2 /* don't include a seconds field in the resultant date string */
#define DATE_NO_TIME 4 /* don't include any time field in the resultant date string */
#define DATE_NO_CENTURY 8 /* don't include a century field in the resultant date string */
/* See documentation for convert_seconds_c in clib's clinklib.cpp for definitions of UTC ctime,
local ctime, and clinks. */
#define DATE_UTC_CTIME_TO_CLINKS 1 /* convert UTC ctime to clinks */
#define DATE_LOCAL_CTIME_TO_CLINKS 2 /* convert local ctime to clinks */
#define DATE_LOCAL_CTIME_TO_UTC_CTIME 3 /* convert local ctime to UTC ctime */
#define DATE_CLINKS_TO_UTC_CTIME 4 /* convert clinks to UTC ctime */
#define DATE_CLINKS_TO_LOCAL_CTIME 5 /* convert clinks to local ctime */
#define DATE_UTC_CTIME_TO_LOCAL_CTIME 6 /* convert UTC ctime to local ctime */
#define DATE_LABVIEW_TO_CLINKS 7 /* convert LabView time to clinks */
#define DATE_LABVIEW_TO_LOCAL_CTIME 8 /* convert LabView time to local ctime */
#define DATE_LABVIEW_TO_UTC_CTIME 9 /* convert LabView time to UTC ctime */
#define DATE_CLINKS_TO_LABVIEW 10 /* convert clinks to LabView time */
#define DATE_LOCAL_CTIME_TO_LABVIEW 11 /* convert local ctime to LabView time */
#define DATE_UTC_CTIME_TO_LABVIEW 12 /* convert UTC ctime to LabView time */
/* The following two values, 13 and 14, were added to convert between the "local db
* datediff clinks" values in the 'clinks' column of table 'accdb.dbo.db_audit' and
* (standard) clinks. This is the only known use of what for a better term I, Carl
* Schumann, am calling "local db datediff clinks". The use of "local db datediff
* clinks" was a mistake faciliated by misunderstandings of exactly what Sybase's
* datediff(second,'Jan 1 1972',getdate()) does. It would be corrected but for ...
* > Date: 5/22/2009 12:47 PM
* > Brian,
* > You may be interested to know that there are almost 3.5 million rows in the
* > db_audit table today. Almost every trigger would need to be modified if we switch
* > from clinks, and there are over 40 triggers.
* > Glenn
* "Local db datediff clinks" like local ctime are non-linear:
* 1. increments by 3601 in a single second at the transition to DST and
* 2. decrements by 3599 in a single second at the transition from DST.
* BECAUSE OF THIS NON-LINEAR BEHAVIOR THEY ARE AN ABOMBINATION THAT UNLIKE
* LOCAL CTIME IS RARE ENOUGH THAT WE TREAT THEM WITH EXTREME CONTEMPT AND
* ARE NOT GENERALLY SUPPORTED ELSEWHERE IN THE CONTROL SYSTEM.
* It should be noted that it is the combination of local times and datediff
* that produce the non-linear mess. datediff(second,'Jan 1 1970',getutcdate()),
* would be a linear, in fact it would just be seconds since the Epoch
* (1/1/1970 midnight UTC).
* "Local db datediff clinks" like (standard) clinks have their t=0 moment at
* 1/1/1972 midnight CST.
* THESE VALUES ARE INTENTIONALLY UNDOCUMENTED IN THE WWW DOCUMENTATION FOR
* convert_seconds_c() BECAUSE WE DON'T WANT ANY MORE USE OF THEM.
* See also:
* http://www-ad.fnal.gov/cgi-cvs/cvsweb.cgi/mecca/uls/ul_clib/clib.h#rev1.215
* http://www-ad.fnal.gov/controls/database/device_database_description.html#db_audit
*/
/* convert "local db datediff clinks" to (standard) clinks */
#define DATE_LOCAL_DB_DATEDIFF_CLINKS_TO_CLINKS 13
/* convert (standard) clinks to "local db datediff clinks" */
#define DATE_CLINKS_TO_LOCAL_DB_DATEDIFF_CLINKS 14
#if 1 /* XXX: For compatibility with previous defines */
#define DATE_GMT_CTIME_TO_CLINKS DATE_UTC_CTIME_TO_CLINKS
#define DATE_CTIME_TO_CLINKS DATE_LOCAL_CTIME_TO_CLINKS
#define DATE_CTIME_TO_GMT DATE_LOCAL_CTIME_TO_UTC_CTIME
#define DATE_CLINKS_TO_GMT DATE_CLINKS_TO_UTC_CTIME
#define DATE_CLINKS_TO_CTIME DATE_CLINKS_TO_LOCAL_CTIME
#define DATE_GMT_TO_CTIME DATE_UTC_CTIME_TO_LOCAL_CTIME
#define DATE_LABVIEW_TO_CTIME DATE_LABVIEW_TO_LOCAL_CTIME
#define DATE_LABVIEW_TO_GMT DATE_LABVIEW_TO_UTC_CTIME
#define DATE_CTIME_TO_LABVIEW DATE_LOCAL_CTIME_TO_LABVIEW
#define DATE_GMT_TO_LABVIEW DATE_UTC_CTIME_TO_LABVIEW
#endif
#define DATE_START_OF_DAY 1 /* find nearest start of day */
#define DATE_START_OF_SHIFT 2 /* find nearest start of shift */
#define DATE_START_OF_WEEK 3 /* find nearest start of week */
#define DATE_START_OF_MONTH 4 /* find nearest start of month */
#define DATE_START_OF_YEAR 5 /* find nearest start of year */
#define DATE_OPT_NONE 0 /* no options selected */
#define DATE_OPT_PREVIOUS_TIME 1 /* return previous time */
#define DATE_OPT_NEXT_TIME 2 /* return next time */
#define DATE_OPT_UTC_CTIME 4 /* return UTC time */
#define DATE_OPT_SUPPRESS_SPECIAL_NOTATION 8 /* suppress special DST overlap time notation */
/*
** ierrtx ...
*/
#define IERRTX_LEN 14
/*
** FTP routines ...
*/
#define FTP_INIT 1 /* initialize normal FTP interface */
#define FTP_TERM 2 /* terminate normal FTP interface */
#define FTP_INTERRUPT 3 /* keyboard interrupt to normal FTP interface */
#define FTP_WIN_INIT 4 /* initialize FTP in a window */
#define FTP_WIN_INTERRUPT 5 /* keyboard interrupt in FTP window */
#define FTP_CREATE_WIN 6 /* create FTP window */
#define FTP_REPOSITION 7 /* reposition normal FTP interface */
#define FTP_WIN_CALLBACK_INIT 8 /* initialize FTP in a window as a callback */
#define FTP_DELETE 9 /* delete normal FTP plot interface */
#define FTP_INIT_WBORDER 10 /* initialize normal FTP plot interface with a border */
#define FTP_START_PLOT 11 /* erase screen and start plot */
#define FTP_START_PLOT_NOERASE 12 /* start plot without erase */
#define FTP_DIAG_DISPLAY_SUMMARY 1 /* enable device summary display */
#define FTP_DIAG_DISPLAY_DIAG 2 /* display diagnostic information (nodes, return periods, buffer sizes) */
#define FTP_DIAG_DUMP_DEVBUF 4 /* dump DEVBUF array */
#define FTP_DIAG_DUMP_EXCON 8 /* dump EXCON array */
#define FTP_DIAG_HIGH_PRIORITY 0x20 /* high priority plot */
#define FTP_DIAG_DUMP_FEFD 0x100 /* dump FEFD array */
#define FTP_DIAG_PAUSE 0x800 /* pause SA for 30+ seconds */
#define FTP_DIAG_DUMP_FEQBUF 0x1000 /* dump FEQBUF array */
#define FTP_DIAG_DUMP_FERBUF 0x2000 /* dump FERBUF array */
#define FTP_DIAG_15HZ_DIAG 0x4000 /* enable 15 Hz return diagnostics */
#define FTP_OPT_NONE 0 /* no options selected */
#define FTP_OPT_NO_DEVICE_COMPLETE 1 /* suppress device completion */
/*
** snapshot plot routines ...
*/
#define SNP_INIT 1 /* initialize normal snapshot plot interface */
#define SNP_TERM 2 /* terminate normal SNP interface */
#define SNP_INTERRUPT 3 /* keyboard interrupt to normal snapshot plot interface */
#define SNP_WIN_INIT 4 /* initialize snapshot plot in a window */
#define SNP_WIN_INTERRUPT 5 /* keyboard interrupt in snapshot plot window */
#define SNP_INIT_SDA 6 /* initialize normal snapshot plot interface for SDA data */
#define SNP_CREATE_WIN 7 /* create snapshot plot window */
#define SNP_REPOSITION 8 /* reposition normal snapshot plot interface */
#define SNP_DELETE 9 /* delete normal snapshot plot interface */
#define SNP_INIT_WBORDER 10 /* initialize normal snapshot plot interface with a border */
#define SNP_START_PLOT 11 /* erase screen and start plot */
#define SNP_START_PLOT_NOERASE 12 /* start plot without erase */
#define SNP_WIN_CALLBACK_INIT 13 /* initialize snapshot plot in a window as a callback */
#define SNP_OPT_NONE 0 /* no options selected */
#define SNP_OPT_NO_DEVICE_COMPLETE 1 /* suppress device completion */
/*
** SDA routines...
*/
#define SDA_COLLIDER_SHOT_USAGE "ColliderShot"
#define SDA_DEFAULT_USAGE SDA_COLLIDER_SHOT_USAGE
#define SDA_DEFAULT_USAGE_NUMBER 1
#define SDA_DEFAULT_CASE_NUMBER 1
#define SDA_MIN_SUBCASE_NUMBER 0
#define SDA_DEFAULT_SUBCASE_NUMBER 1
#define SDA_DEFAULT_TRY_NUMBER 1
/*
** Save/restore routines ...
*/
#define SR_ALL_SYSTEMS 65534 /* all supersystems */
#define SR_GLOBAL 0 /* global supersystem */
#define SR_LINAC 1 /* Linac supersystem */
#define SR_BOOSTER 2 /* Booster supersystem */
#define SR_MAINRING 3 /* Main Ring supersystem */
#define SR_MAININJECTOR 3 /* Main Injector supersystem */
#define SR_SWITCHYARD 4 /* Switchyard supersystem */
#define SR_EXTERNALBEAMS 4 /* external beams supersystem */
#define SR_TEVATRON 5 /* Tevatron supersystem */
#define SR_PBAR 6 /* P-bar supersystem */
#define SR_FRIG 7 /* frig supersystem */
#define SR_MISC 8 /* Miscellaneous supersystem */
#define SR_ECOOL 8 /* Electron Cooling supersystem */
#define SR_ARCHIVE 9 /* archive supersystem */
#define SR_RECYCLER 10 /* Recycler supersystem */
#define SR_SHOTS 11 /* shots supersystem */
#define SR_CIRCULAR 12 /* circular supersystem */
#define SR_MINIBOONE 13 /* MiniBooNE supersystem */
#define SR_NUMI 14 /* NuMI supersystem */
#define SR_HINS 15 /* HINS supersystem */
#define SR_NML 16 /* NML supersystem */
#define SR_MTA 17 /* MTA (Muon Test Area) supersystem */
#define SR_SYCONFIG 18 /* SwitchYard CONFIGuration supersystem */
#define SR_SPARE5 19 /* spare 5 supersystem */
#define SR_SPARE4 20 /* spare 4 supersystem */
#define SR_SPARE3 21 /* spare 3 supersystem */
#define SR_SPARE2 22 /* spare 2 supersystem */
#define SR_SPARE1 23 /* spare 1 supersystem */
#define SR_NUM_SUPERSYSTEMS 19 /* number of save/restore supersystems actually in use */
#define SR_MAX_SUPERSYSTEMS 24 /* maximum supported number of save/restore supersystems */
#define SR_BY_FILE_NUMBER 0 /* do directory by file number */
#define SR_BY_SYSTEM_AND_DATE 1 /* do directory by date for a system file */
#define SR_BY_DATE 2 /* do directory by date */
#define SR_EXACT_MATCH 1 /* search for exact match */
#define SR_EQUAL_OR_GREATER 2 /* search for greater than or equal to key */
#define SR_GREATER_THAN 3 /* search for greater than key */
#define SR_EQUAL_OR_LESS 4 /* search for less than or equal to key */
#define SR_LESS_THAN 5 /* search for less than key */
#define SR_SDA_NORMAL 0x8001 /* select normal SDA files */
#define SR_SDA_ARCHIVED 0x8002 /* select archived SDA files */
#define SR_SDA_FROM_TAPE 0x8100 /* select SDA files loaded from archive tapes */
#define SR_SDA_ARCHIVE_BASE 0x8101 /* select archived SDA files */
#define SR_SDA_NUM_ARCHIVES 10 /* number of archived SDA file directories */
#define SR_DIR_ENTRY_LEN 54 /* length of a save/restore directory entry */
#define SR_FILES_PER_SUPERSYSTEM 100 /* number of Save/Restore files per supersystem */
#define SR_MIN_FILE_NUMBER 0 /* minimum save/restore file number */
#define SR_MAX_FILE_NUMBER (SR_NUM_SUPERSYSTEMS*SR_FILES_PER_SUPERSYSTEM - 1) /* maximum save/restore file number */
#define SR_REQUEST_HEADER_LEN 10 /* size of save/restore work area request header in bytes */
#define SR_REQUEST_ENTRY_LEN 12 /* size of save/restore work area request entry in bytes */
#define SR_WORK_HEADER_LEN 6 /* size of save/restore work area reply header in bytes */
#define SR_INFO_ENTRY_LEN 4 /* size of save/restore work area reply entry in bytes */
#define SR_PROTECT_NONE 0 /* no file protection */
#define SR_PROTECT_OPERATOR 1 /* operator level file protection */
#define SR_PROTECT_MODIFY 0x4000 /* modify level file protection */
#define SR_PROTECT_ARCHIVE 0x8000 /* archive level file protection */
#define SR_PROP_MASK_READ 1 /* mask for reading property */
#define SR_PROP_MASK_SET 2 /* mask for setting property */
#define SR_PROP_MASK_BASIC_STATUS 4 /* mask for basic status property */
#define SR_PROP_MASK_ANALOG_ALARM 8 /* mask for analog alarm property */
#define SR_PROP_MASK_DIGITAL_ALARM 0x10 /* mask for digital alarm property */
/*
** copies routines ...
*/
#define COPY_INITIALIZE 1 /* initialize fixed copies field */
#define COPY_TERMINATE 2 /* terminate fixed copies field */
#define COPY_SERVICE 3 /* service fixed copies field */
#define COPY_CREATE_WINDOW 4 /* create copies window */
#define COPY_INITIALIZE_CALLBACK 5 /* initialize fixed copies field to be serviced with a callback */
#define COPY_SAVE_POSITION 1 /* save current copies field coordinates */
#define COPY_RESTORE_POSITION 2 /* restore previous copies field coordinates */
#define COPY_TV 6 /* TV window */
#define COPY_GXP_1 5 /* graphics window 1 */
#define COPY_GXP_2 10 /* graphics window 2 */
#define COPY_TP 7 /* touch panel window */
#define COPY_ALARMS 8 /* alarms window */
#define COPY_DEFAULT_BW -3 /* default black/white printer */
#define COPY_DEFAULT_COLOR -2 /* default color printer */
#define COPY_SAVE_FILE -1 /* save file (Page D5) */
#define COPY_DEFAULT_SIZE 0 /* print at default size */
#define COPY_THIS_CONSOLE 0 /* copy from present console */
#define COPY_DEFAULT_YELLOW_BLUE 0 /* use default yellow/blue switch */
#define COPY_NORMAL_COLOR 1 /* normal yellow/blue */
#define COPY_REVERSE_COLOR 2 /* reverse yellow/blue (default for color alpha screens) */
#define COPY_PROGRAM_COLOR 3 /* use program default (default for color graphics screens) */
#define COPY_REVERSE_BW 0 /* reverse black/white (default) */
#define COPY_NORMAL_BW 1 /* normal black/white */
#define COPY_UNBOLD 0 /* normal image (default) */
#define COPY_BOLD 1 /* bold image (printed twice) */
/*
** Lextools ...
*/
#define LEXT_IMAGE_NAMLEN 8 /* length of a Lex Draw image name */
#define LEXT_OBJECT_NAMLEN 8 /* length of a Lex Object name */
#define LEXT_OPEN 1 /* open image file */
#define LEXT_DISPLAY 2 /* display image file */
#define LEXT_DISPLAY_NOERASE 3 /* display image without erase */
#define LEXT_DISPLAY_BLINK 4 /* display blinking image file */
#define LEXT_DISPLAY_NOERASE_BLINK 5 /* display blinking image file without erase */
/*
** Alarms ...
*/
#define ALARM_GOOD -1 /* alarm is going good */
#define ALARM_BAD 0 /* alarm is going bad */
#define ALARM_EXCEPTION -1 /* alarm is an exception */
#define ALARM_EVENT 0 /* alarm is an event */
#define ALARM_LOW -1 /* low alarm */
#define ALARM_NO_LOHI 0 /* alarm is neither low nor high */
#define ALARM_HIGH 1 /* high alarm */
#define ALARM_LOHI 3 /* alarm is both low and high */
#define ALARM_DEFAULT_WINDOW 0 /* display in default window */
#define ALARM_SYSTEM_WINDOW 1 /* display in the system window */
#define ALARM_TEXT_LEN 29 /* maximum number of alarm text characters */
/*
** library information
*/
#define CLIB_TYPE_NORMAL 1 /* normal CLIB */
#define CLIB_TYPE_TEST 3 /* private test CLIB */
#define LIBRARY_TYPE_NORMAL 1 /* normal library */
#define LIBRARY_TYPE_TEST 3 /* test library */
#define LIBRARY_INFO_NAME_LEN 32 /* maximum length of a library name */
#define LIBRARY_INFO_BUILD_DATE_LEN 32 /* maximum length of a library build date */
#define LIBRARY_INFO_BUILD_HOST_LEN 64 /* maximum length of a library build host name */
#define LIBRARY_INFO_BUILD_DIR_LEN 128 /* maximum length of a library build directory name */
#define LIBRARY_INFO_TAG_LEN 32 /* maximum length of a library version tag */
#define LIBRARY_INFO_TAG_DATE_LEN 32 /* maximum length of a library tag date */
/*
** display_type...
*/
#define DISPLAY_NONE 0 /* no display is available */
#define DISPLAY_ALPHANUMERIC 1 /* only an alphanumeric display is available */
#define DISPLAY_GRAPHIC 2 /* only a graphic display is available */
#define DISPLAY_BOTH (DISPLAY_ALPHANUMERIC | DISPLAY_GRAPHIC) /* both types of display are available */
/*
** cve...
*/
#define CVE_MIN_CHARS 6 /* minimum number of characters for a CVE conversion */
#define CVE_MAX_CHARS 16 /* maximum useful number of characters for a CVE conversion */
/*
** cvg, ckcvg...
*/
#define MAX_FLOAT_CHARS 16 /* maximum allowable number of characters for a float conversion */
/*
** logger_ routines...
*/
#define LOGGER_FAST 0 /* fast logging rate */
#define LOGGER_NORMAL 1 /* normal logging rate */
#define LOGGER_SLOW 2 /* slow logging rate */
#define LOGGER_REQUEST_DATA 2 /* data request type code */
#define LOGGER_REQUEST_DEVICE 17 /* data request type code */
#define LOGGER_ANY_NODE 0xFFFF /* get data from any node */
#define LOGGER_FASTEST_NODE 0xFFFE /* get data from node logging data at the fastest rate */
#define LOGGER_SHOTDB_NODE 0xFFFC /* get data from shot database */
#define LOGGER_SDA_NODE 0xFFFC /* get data from SDA node */
#define LOGGER_COLLIDER_SDA_NODE 0xFFFB /* get data from the Collider SDA node */
#define LOGGER_PBAR_SDA_NODE 0xFFFA /* get data from the Pbar SDA node */
#define LOGGER_RECYCLER_SDA_NODE 0xFFF9 /* get data from the Recycler SDA node */
#define LOGGER_LISTS_PER_NODE 18 /* number of device lists per node */
#define LOGGER_DEVICES_PER_LIST 60 /* number of devices per list */
#define LOGGER_ALL_NODES (-10) /* specify all logger nodes */
#define LOGGER_ALL_LISTS (-1) /* specify all logger lists */
#define LOGGER_SAMPLE_TYPE_NONE 0 /* no sample type selected */
#define LOGGER_SAMPLE_TYPE_DATA_EVENT 1 /* sample data on a particular data event */
#define LOGGER_SAMPLE_TYPE_LIST_ID 2 /* sample data from a particular list ID */
#define LOGGER_ALL_SDA_CASES 0 /* get data from any SDA case */
#define LOGGER_ANY_SDA_SET -1 /* get data from any SDA set */
#define LOGGER_ALL_SDA_SETS -1 /* get data from any SDA set */
#define LOGGER_ANY_SDA_DATA 0 /* get any SDA data */
#define LOGGER_FINAL_SDA_DATA 1 /* get "final" SDA data values */
#define LOGGER_OPT_NONE 0 /* no logger options selected */
#define LOGGER_OPT_SDA_DATA 1 /* SDA data requested */
#define LOGGER_OPT_SAME_DI 2 /* use the same device index for all entries */
#define LOGGER_OPT_SAME_INDEX 4 /* use the same array index for all entries */
#define LOGGER_OPT_SAME_PI 8 /* use the same property index for all entries */
#define LOGGER_OPT_SAME_NODE 0x10 /* use the same node for all entries */
#define LOGGER_OPT_SINGLE_PRECISION 0x20 /* single precision float values requested */
#define LOGGER_OPT_ORDER_BY_NODE 0x40 /* order results by node name */
#define LOGGER_OPT_ALPHABETIZE 0x80 /* order results alphabetically */
#define LOGGER_OPT_WANT_SINGLE_ELEMENT 0x100 /* want a single element from an array */
#define LOGGER_OPT_EXACT_DEVICE_MATCH 0x200 /* want an exact device match */
#define LOGGER_OPT_NO_CLIENT_EVENTS 0x400 /* don't match entries that have a client data event */
#define LOGGER_OPT_NEGATE_DATA_EVENT 0x800 /* don't match entries that have a specified data event */
#define LOGGER_OPT_WILDCARD_NAME 0x1000 /* perform a wildcard match on the device name */
#define LOGGER_OPT_WILDCARD_ARRAY_INDEX 0x2000 /* perform a wildcard match for any array indices */
#define LOGGER_OPT_COLUMN_ORDER_INDEX 0x4000 /* return the column order index (rather than row order) */
#define LOGGER_USE_UTC (TRUE) /* determine whether or not timestamps are in UTC */
/*
** console window support
*/
#define WINDOW_SMALL 0 /* small window */
#define WINDOW_MEDIUM 1 /* medium window */
#define WINDOW_LARGE 2 /* large window */
#define WINDOW_NOT_LARGE -1 /* not large window (TV windows only) */
/*
** process_name_to_slot_instance...
*/
#define PROGRAM_TYPE_UNKNOWN 0 /* unknown program type */
#define PROGRAM_TYPE_PA 1 /* Primary Application */
#define PROGRAM_TYPE_SA 2 /* Secondary Application */
#define PROGRAM_TYPE_UTILITY 3 /* utility program */
#define PROGRAM_TYPE_NONUSER 4 /* nonuser application */
/*
** remote program support...
*/
#define REMPGM_ANY_CONSOLE -1 /* choose any console */
#define REMPGM_NONE 0 /* no remote program request */
#define REMPGM_SCRIPT 1 /* execute a remote script */
#define REMPGM_METHOD 2 /* execute a remote method */
#define REMPGM_FOREIGN_BUILT 3 /* execute a request which has already been built */
#define REMPGM_NO_METHOD 4 /* execute remote null method */
#define REMPGM_SCRIPT_LIST 5 /* execute a remote script list */
/*
** is_generic_message...
*/
#define GENMESS_NONE 0 /* not a generic message */
#define GENMESS_REMOTE_PROGRAM 1 /* remote program message */
/*
** find_program_c...
*/
#define FIND_PROGRAM_MAX 512 /* maximum number of locations to request */
/*
** FPIEEE ...
*/
#define FP_IEEE_TO_DEC 0 /* convert IEEE format to DEC format */
#define FP_DEC_TO_IEEE 1 /* convert DEC format to IEEE format */
/*
** IEEE floating point conversions
*/
#define IEEE_OPT_NONE 0 /* no options selected */
#define IEEE_OPT_DOUBLE_VALUES 1 /* source and destination values are double precision floats */
#define IEEE_OPT_BIG_ENDIAN 2 /* treat the source data as big endian */
/*
** database routines
*/
#define DB_OPT_NONE 0 /* no options selected */
#define DB_TYPE_BYTE 0x30 /* single byte unsigned integer (0-255) (SYBINT1) */
#define DB_TYPE_SHORT 0x34 /* two byte signed integer (-32768-32767) (SYBINT2) */
#define DB_TYPE_LONG 0x38 /* four byte signed integer (SYBINT4) */
#define DB_TYPE_BINARY 0x2D /* fixed length binary array (SYBBINARY) */
#define DB_TYPE_VARBINARY 0x25 /* variable length binary array (SYBVARBINARY) */
#define DB_TYPE_CHAR 0x2F /* fixed length character array (SYBCHAR) */
#define DB_TYPE_VARCHAR 0x27 /* variable length character array (SYBVARCHAR) */
#define DB_TYPE_DATETIME 0x3D /* date/time (SYBDATETIME) */
#define DB_TYPE_FLOAT 0x3B /* single precision floating point value (SYBREAL) */
#define DB_TYPE_NUMERIC 0x6C /* single precision floating point value (SYBNUMERIC) */
#define DB_TYPE_DECIMAL 0x6A /* single precision floating point value (SYBDECIMAL) */
#define DB_TYPE_DOUBLE 0x3E /* double precision floating point value (SYBFLT8) */
#define DB_TYPE_IMAGE 0x22 /* image data (SYBIMAGE) */
#define DB_TYPE_TEXT 0x23 /* text data (SYBTEXT) */
#define DB_MAX_USERS 250 /* maximum number of users per server */
#define DB_MAX_ADBS_USERS (DB_MAX_USERS) /* maximum number of ADBS (appdb) users */
#define DB_MAX_BDBS_USERS 50 /* maximum number of BDBS (srdb) users */
#define DB_MAX_CDBS_USERS (DB_MAX_USERS) /* maximum number of CDBS (accdb) users */
#define DB_USERS_TEXT_LEN 69 /* length of a db_users entry */
/*
** clock routines
*/
#define CLOCK_DEFAULT (-1) /* default clock event */
#define CLOCK_TCLK 0 /* TCLK event */
#define CLOCK_MIBS 1 /* MIBS event */
#define CLOCK_TVBS 2 /* TVBS event */
#define CLOCK_RRBS 3 /* RRBS event */
#define CLOCK_TEST 4 /* test clock event */
#define CLOCK_HCLK 5 /* HCLK event */
#define CLOCK_NCLK 6 /* NCLK event */
#define CLOCK_OPT_NONE 0 /* no options selected */
#define CLOCK_OPT_LOCAL_DATA 0 /* use local clock data */
#define CLOCK_OPT_REMOTE_DATA 1 /* use remote clock data */
/*
** environment routines
*/
#define EXECUTABLE_MAX_LEN 255 /* maximum length of an executable name */
/*
** delimited files ...
*/
#define FILE_TYPE_CSV 1 /* comma separated file */
#define FILE_TYPE_EXCEL 2 /* Excel file */
#define FILE_TYPE_TSV 3 /* tab separated file */
#define FILE_OPT_NONE 0 /* no options selected */
#define FILE_OPT_DELETE_FILE 1 /* delete file after processing */
#define FILE_OPT_TRIM 2 /* trim white space from data fields */
/*
** CAMAC ...
*/
#ifndef CAMAC_ERROR_TEXT_LEN
#define CAMAC_ERROR_TEXT_LEN 21 /* maximum length of a CAMAC error message */
#define CAMAC_OK 0 /* success */
#define CAMAC_NO_Q -1 /* no Q */
#define CAMAC_NO_X -2 /* no X */
#define CAMAC_ARBCON -3 /* arbitration conflict (obsolete) */
#define CAMAC_NO_SRP -4 /* no SRP */
#define CAMAC_TIMEOUT -5 /* timeout */
#define CAMAC_PROTERR -6 /* protocol error */
#define CAMAC_ECHOCHK -7 /* echo check */
#define CAMAC_PARITYERR -8 /* parity error */
#define CAMAC_SLC_TIMEOUT -9 /* serial link controller timeout */
#define CAMAC_REJECT -10 /* reject */
#define CAMAC_BAD_NAF -125 /* invalid NAF requested */
#define CAMAC_PORTA_XERROR -126 /* port A transmit error */
#define CAMAC_BADARB -127 /* block transfer arbitration error */
#define CAMAC_CC_BADSTATUS -128 /* invalid status from crate controller */
#endif
#define CAMAC_MADC_OPT_NONE 0 /* no options selected */
#define CAMAC_MADC_OPT_NO_HRMS 1 /* do not include HRMs */
/*
** app_executable_exists ...
*/
#define APP_TYPE_UNKNOWN 0 /* unknown application type */
#define APP_TYPE_PA 1 /* primary application */
#define APP_TYPE_SA 2 /* secondary application */
#define APP_TYPE_TEST_PA 9 /* test primary application */
#define APP_TYPE_TEST_SA 10 /* test secondary application */
/*
** host names
*/
#define IPNAME_OPT_NONE 0 /* no options selected */
#define IPNAME_OPT_WANT_NUMERIC 1 /* want numeric IP name */
#define IPNAME_OPT_USE_ACNET 2 /* determine host name through ACNET */
/******************************************************************************/
/*
** returned status definitions for CLIB routines
*/
/******************************************************************************/
/*
** rdspx ...
*/
#define CLIB_SETTOMIN 1 /* set to minimum value */
#define CLIB_SETTOMAX 2 /* set to maximum value */
/*
** clib_environment ...
*/
#define ENV_NON_CONSOLE 0 /* not a console environment */
#define ENV_CONSOLE_INSTANCE 1 /* console instance evnironment */
// set_beam_switch routine
#define BSSB_MASTER 1 // Id of Master switch.
#define BSSB_BOOSTER 2 // Id of Booster switch.
#define BSSB_P_BAR 3 // Id of P-bar switch.
#define BSSB_MAIN_INJ 4 // Id of Main Injector switch.
#define BSSB_TEVATRON 5 // Id of Tevatron switch.
#define BSSB_SWITCHYARD 6 // Id of Switchyard switch.
#define BSSB_RECYCLER 7 // Id of Recycler switch.
#define BSSB_NUMI 8 // Id of NUMI switch.
#define BSSB_BOONE 9 // Id of BooNE switch.
#define BSSB_SWITCH_ON 1 // Switch on - enable beam.
#define BSSB_SWITCH_OFF 0 // Switch off - disable beam.
#define BSSB_SEQUENCER (-1) // "Console" id of the sequencer.
#define BSSB_S_SWITCH_CT (CONSOLE_MAX+1) // Max. number of software beam switches.
#define BSSB_H_SWITCH_CT 14 // Number of harware beam switches.
/******************************************************************************/
/*
** function prototypes for modules in CLIB
*/
/******************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
int acctim(char *cycle_type, short *reset_event=(short *) NULL); /* get elapsed time since reset events */
int acnet_copy_window_c(int console, int window, int queue,
char *title=(char *) NULL,
int size=COPY_DEFAULT_SIZE,
int yellow_blue=COPY_DEFAULT_YELLOW_BLUE,
int black_white=COPY_REVERSE_BW,
int bold=COPY_UNBOLD, int reply_now=TRUE);
int acnet_error_category(ACNET_ERR *acnet_error, int *category);
int acnet_error_code(char *passed_text, ACNET_ERR *acnet_error);
int acnet_error_description_c(ACNET_ERR *acnet_error, char *error_text,
int max_return);
int acnet_error_text(ACNET_ERR *acnet_error, char *text);
int acnet_task_exists_c(int node, char *task_name, int *exists,
int *task_id=(int *) NULL);
int acnet_task_id_to_name_c(int node, int task_id, char *task_name);
int acnet_task_info_c(int node, char *task_name,
int *task_id=(int *) NULL,
int *is_server=(int *) NULL,
unsigned int *pid=(unsigned int *) NULL);
int acnet_task_pid_to_name_c(int passed_node, unsigned int task_pid,
int max_return, int *num_returned=(int *) NULL,
char *task_name=(char *) NULL);
int add_delimited_file_header_c(char *file_name, int file_type,
int delimiter, unsigned int options,
int num_lines, char **header_lines);
int alarm_cancel_message_c(int device_index, int alarm_type);
int alarm_report(short *id,int *reading=(int *)NULL,char *good_bad=(char *)NULL,
char *exception=(char *)NULL,char *high_low=(char *)NULL);
int alarm_rptw_text(short *id, char *text,int *reading=(int *)NULL,
char *good_bad=(char *)NULL,char *exception=(char *)NULL,
char *high_low=(char *)NULL);
int alarm_send_message_c(int device_index, int alarm_type, int event_type,
char *text, int text_length, double reading,
int good_bad, int high_low);
int alarm_submit_event(int device_index, int alarm_type, char *text,
int text_length, float reading, int good_bad,
int high_low, int display_window);
int app_debug_mode(void);
int app_executable_exists(char *process_name, int *app_type=(int *) NULL,
unsigned int *file_date=(unsigned int *) NULL);
int application_author_c(char *name, char *authors, char *keepers,
short *errors, int num_programs,
char *backups=(char *) NULL);
int application_description_c(char *name, char *descriptions,
short *errors, int num_programs);
#ifdef __cplusplus
int *argptr(...); /* return pointer to argument list */
#else
int *argptr(); /* return pointer to argument list */
#endif
void asbwho(int *sstsk, int *lxtsk, int *sa2, int *sa3);
void asbwho_pa(int *pa, int *pb, int *alarm=(int *)NULL);
unsigned int local_asctime_to_clinks(char *date,int *status=(int *) NULL);
int bit_count_c(void *byte_array, int start_bit, int num_bits,
int *lowest_bit_set, int *highest_bit_set);
int bit_field_circular_shift_c(void *value, int start_bit, int end_bit,
int num_bits);
int camac_btr_test_data_c(int node, int command_count,
unsigned char *slots,
CAMAC_BLOCKX_CRATE_SCAN_DATA *btr_data,
int *actual_nodes);
int camac_component_nodes_c(int node, int *num_nodes, int **nodes);
int camac_crate_list_c(int node, int *num_crates, int max_return,
int *crates, int *actual_nodes);
int camac_crate_status_list_c(int node, short *crate_status,
int *actual_nodes);
int camac_crate_to_node_c(int node, int crate, int *actual_node);
int camac_first_slot_list_c(int node, unsigned int options,
unsigned char *filled_slots,
int *actual_nodes, camac_update_function update_func);
int camac_madc_list_c(int node, int *num_madcs, int max_return,
int *madc_numbers, int *crates, int *slots,
int *actual_nodes,
unsigned int options=CAMAC_MADC_OPT_NONE);
int camac_madc_to_node_c(int node, int madc_number, int *actual_node);
int camac_node_list_c(int *num_nodes, int max_return, int *nodes);
int central_service_info(char *name, char *author, char *keeper,
char *description,int *node=(int *) NULL,
char *backup=(char *) NULL);
void chgpgm(void const *task, unsigned char const *slot, short *error,
void const *cmd_buf=NULL, int *sa_r50_task=NULL,
int script_flag=0, int command_buffer_length=CMD_LIN_SIZ); /* start up an application */
void chgpgm_c(void const *task, int slot, short *error,
void const *command_buffer, int *rad50_task,
int script, int command_buffer_length);
int chgpgm_allow_log(void);
int chgpgm_dont_log(void);
void chgpgm_redirect(int redirect); /* set chgpgm redirect boolean */
void ckcvd(char *lbuf, short *start, short *nchars,
float *value, short *ok); /* synonym for CKCVG */
void ckcve(char *lbuf, short *start, short *nchars,
float *value, short *ok); /* synonym for CKCVG */
void ckcvg(char *lbuf, short *start, short *nchars,
float *value, short *ok=(short *) NULL); /* convert an ASCII string to a real value */
void ckcvg8(char *lbuf, short *start, short *nchars,
double *value, short *ok=(short *) NULL); /* convert an ASCII string to a double precision value */
void ckcvh(char *lbuf, short *start, short *nchars,
short *value, short *ok); /* convert a hex string to an int */
void ckcvi(char *lbuf, short *start, short *nchars,
short *value, short *ok); /* convert an ASCII string to an int */
void ckcvn(char *lbuf, short *start, short *nchars,
short *value, short *ok, short *radix); /* convert an ASCII string to an int */
void ckcvo(char *lbuf, short *start, short *nchars,
short *value, short *ok); /* convert an octal string to an int */
void cknob(short *row, short *delta, short *col=(short *) NULL,
short *knbcnt=(short *) NULL); /* return console knob data */
void cktrmu(void); /* check to see if you should terminate */
int class_alarms_cdf(void); /* return TRUE if a CDF alarm class console */
int class_any_redirect(int central_slot); /* TRUE if DAQ redirected */
int class_check_utisets(int this_uti);
int class_do_check(int mask);
int class_get(void);
void class_get_names(int mask, char *return_string);
void class_get_names_safe(int mask, char *return_string, size_t size);
int class_get_sets(void);
int clib_environment(void); /* get CLIBSHR environment */
FILE *clib_fopen(char *file_spec, char *mode);
int clib_open(char *file_spec, int flags, unsigned int mode=0);
int clib_type(void);
char *clibshr_date(void); /* get date of CLIBSHR build*/
char *clibshr_tag(void);
unsigned int clibshr_version(void); /* get version of CLIBSHR */
unsigned int clinks_now(void); /* get clink value for the present time */
clib_time_t clib_time(clib_time_t * pTime = (clib_time_t *)0); /* get seconds value for the present time */
char *clib_ctime(clib_time_t *pTime, char *ubuf = 0);
struct tm *clib_localtime(const clib_time_t *pTime, struct tm *uresult = 0);
struct tm *clib_gmtime(const clib_time_t *pTime, struct tm *uresult = 0);
int clib_gettimeofday(struct timeval *tv, struct timezone *tz);
clib_time_t clib_mktime(struct tm *tm);
void clib_ftime(struct timeb *tb);
void clib_version_strings(char *name=(char *) NULL,
char *build_date=(char *) NULL,
char *build_host=(char *) NULL,
char *build_dir=(char *) NULL,
char *tag=(char *) NULL,
char *tag_date=(char *) NULL);
int clinks_localtime(unsigned int clinks, struct tm *local_time);
unsigned int clinks_to_local_ctime_c(unsigned int clinks);
int clinks_to_date(unsigned int clinks, char *date,
unsigned int options=DATE_OPT_NONE); /* convert a clink value to an ASCII date string */
int utc_ctime_to_date(time_t const utc_ctime, std::string &date, bool output_utc = false);
int clinks_to_datime_c(unsigned int clinks, char *date);
int clinks_to_day_of_week_c(unsigned int clinks,char *ascii_day=(char *)NULL);
int clinks_to_julian_date_c(unsigned int clinks, double *julian_date);
int clinks_to_special_time_c(unsigned int clinks, int type,
unsigned int options,
unsigned int *special_time);
int clinks_to_year_c(unsigned int clinks=0);
int clipboard_export(char *text);
int clipboard_export_close(void);
int clipboard_export_open(FILE **fhandle);
int clock_get_console_multicast_type(void);
int clock_set_console_multicast_type(int mcast_type);
void clock_set_multicast_type(int user_mcast_type);
void clref(short *event_flag, short *ret_status=(short *) NULL); /* clear an event flag */
void cns_beep(int volume);
void cns_raise_util(void);
int common_transform_num_const_c(int common_index);
unsigned int convert_compare_date_to_clinks(char *date, int *status);
int console_slot_program_state_c(int console, int slot, int *state,
int *script_state=(int *) NULL,
char *generic_name=(char *) NULL,
char *process_name=(char *) NULL);
int console_task_name_c(char *generic_name, int slot,
int console_number, char *task_name);
int console_user_name_to_full_name(char *user_name, char *full_name);
int console_window_give_focus_c(int window_id);
int console_window_has_focus_c(int window_id);
unsigned int convert_seconds_c(unsigned int source_time, int convert_type);
void copies(short *ent_code, short *ent_row, short *ent_col);
void copies_c(int ent_code, int ent_row, int ent_col);
void cprstv(XCHAR *xbuf, short *nchars, unsigned char *cbuf,
short *clen, short *status); /* compress a TV image */
unsigned int local_ctime_to_clinks_c(unsigned int c_time);
int ctname(int *r50gen, char *slot, short *console_num = 0);
int current_clib_installed(void);
unsigned int current_time_in_clinks(unsigned int *milliseconds=(unsigned int *) NULL);
unsigned int current_time_utc(unsigned int *milliseconds=(unsigned int *) NULL);
void cvdec(char *buffer, short *start, short *num_chars, float *value,
short *iok=(short *) NULL); /* synonym for CKCVG */
void cvdi4(char *buffer, short *start, short *num_chars,
int *value, short *ok); /* convert a string to an int */
void cvdi8(char *buffer, short *start, short *nchars, long long *value,
short *ok);
void cve(float *value, short *num_chars, char *buffer, short *start);
void cvg(float *value, short *num_chars, char *buffer, short *start);
void cvg8(double *value, short *num_chars, char *buffer, short *start);
void cvh(char *input, short *num_chars, char *buffer, short *start,
char *fillchar=(char *) NULL); /* convert a hex int to a string */
void cvhi4(char *buffer, short *start, short *nchars, int *value,
short *ok);
void cvhi8(char *buffer, short *start, short *nchars, long long *value,
short *ok);
void cvi(short *value, short *num_chars, char *buffer, short *start,
char *fillchar=(char *) NULL); /* convert an int to a string */
void cvi4d(int *value, short *num_chars, char *buffer, short *start,
char *fillchar=(char *) NULL); /* convert an int to a string */
void cvi4h(int *value, short *num_chars, char *buffer, short *start,
char *fillchar=(char *) NULL);
void cvi4n(int *value, short *nchars, char *buffer, short *istart,
short *iradix, char *fillchar=(char *) NULL);
void cvi4o(int *value, short *num_chars, char *buffer, short *start,
char *fillchar=(char *) NULL); /* convert an int to an octal string */
void cvi8d(long long *value, short *nchars, char *buffer, short *start,
char *fillchar=(char *) NULL);
void cvi8h(long long *value, short *nchars, char *buffer, short *start,
char *fillchar=(char *) NULL);
void cvi8n(long long *value, short *nchars, char *buffer, short *istart,
short *iradix, char *fillchar=(char *) NULL);
void cvi8o(long long *value, short *nchars, char *buffer, short *start,
char *fillchar=(char *) NULL);
void cvn(short *value, short *num_chars, char *buffer, short *start,
short *radix, char *fillchar=(char *) NULL); /* convert an int to a string */
void cvo(short *value, short *num_chars, char *buffer, short *start,
char *fillchar=(char *) NULL); /* convert an int to an octal string */
unsigned int date_to_clinks(char *date, int *status=(int *) NULL); /* convert an ASCII date to clinks */
void datime(char *date); /* get ASCII date and time */
unsigned int datime_to_clinks(char *date, int *status=(int *) NULL);
void daweek(short *date_array, short *day); /* get the day of the week */
int dbareq(int *di, unsigned char *pi, char *work_area,
short *irinx, short *error); /* request misc database info */
int dbget(short *irinx, char *work_area, char *indata,
short *error,short *max_length=(short *) NULL,
short *ret_length=(short *) NULL); /* get database data */
int dbgeti(short *irinx, char *work_area, short *pointer,
short *error,short *ret_length=(short *) NULL); /* get index to database data */
int dbproc(char *work_area, short *event_flag,
short *error,short *passed_timeout=(short *) NULL); /* process database requests */
int dbrdi(char *dname, char *work_area, short *irinx,
short *error); /* request name to DI info */
int dbreq(int *di, unsigned char *pi, char *work_area,
short *irinx, short *error); /* request database data */
int dbrmc(char *emc, char *work_area, short *irinx,
short *error); /* request EMC to DI info */
int dbrpdb(int const *di, unsigned char const *pi, char *work_area,
short *irinx, short *error); /* request PDB data */
int dbsize(char *work_area, short *size, short *error); /* get # of bytes in use in DBM work buffer */
int dbwain(char *work_area, short *length); /* init database work area */
void db_close(db_handle_t *handle);
short db_insert(db_handle_t *handle, char const *table_name,
int num_columns, int const *data_types, int num_rows,
db_insert_data_t const* field_data, int *num_rows_copied);
unsigned int db_date_to_clinks(char *db_date, int *status,
int sybase_format=0);
void db_date_to_date_c(char *db_date, char *date,
unsigned int convert_flags, int sybase_format=0);
char *db_error(db_handle_t *handle);
void db_free_result_set_info(int num_result_sets,
DB_RESULT_SET_INFO **result_set_info);
short db_get_result_set_info(db_handle_t *const vhandle,
char const *const request_buffer,
int *num_result_sets,
DB_RESULT_SET_INFO **result_set_info);
short db_modify(db_handle_t *handle, char const *request_buffer,
unsigned int *rows_affected);
short db_nextrow(db_handle_t *vhandle, unsigned int bytes_per_row,
void *reply_buffer, unsigned int *bytes_returned);
short db_open(db_handle_t **handle, char const db_server[],
char const db_name[], int max_wait, bool special = FALSE);
short db_select(db_handle_t *handle, char const *request_buffer,
unsigned int *num_rows, unsigned int bytes_per_row,
void *reply_buffer);
short db_send_c(unsigned int request_no_of_rows, char const *request_buffer,
unsigned int request_size, unsigned int bytes_per_row,
unsigned int *reply_no_of_rows, void *reply_buffer,
unsigned short max_wait, db_ast_function ast_addr,
int ast_param, char *error_text, short *return_code);
void db_free_image(void*);
// int db_set_account(char const *account);
int db_set_password(char const *password);
int db_timeout_from_dio(int min_timeout=0);
short db_users(char *server, void *buffer, unsigned int *retrows); /* get db users */
int dec_to_ieee_float_c(void *ieee, void *dec, int num_values,
unsigned int options);
float delta_seconds(const vmstime start, const vmstime end); /* get delta seconds from 2 vmstimes */
double delta_time(int new_start_time);
int delta_time_allocate(void **private_data);
int delta_time_free(void *private_data);
int delta_time_history(int max_return, double *times);
double delta_time_private(int new_start_time, void *private_data);
int delta_time_history_private(int max_return, double *times,
void *private_data);
int device_help_text_c(int device_index, char **help_text);
char *device_help_url(int device_index);
int dio_clear_redirection_slot(int slot);
void dio_log_error(unsigned int dipi, short error); /* add an error to log queue */
void dio_enable_error_logging(char on); /* control error logging */
int dio_set_redirection_slot(int slot);
void display_url(char *url);
void display_tele(char const *bagde_id); // badge id, e.g., "11579N"
int di2nam(char *dname, int *di,char *work_area= (char *)NULL,
short *numdev = (short *)NULL); /* convert a DI to a name */
void dknob(short *row, short *delta, short *col=(short *) NULL,
short *knbcnt=(short *) NULL); /* get console knob data */
void dncase(char *string, short *numchar=NULL); /* convert a string to lower case */
void dncase_c(char *string, int nchar=0); /* convert a string to lower case */
void dpcanq(void); /* cancel queued settings */
void dpdcrl(unsigned short *irinx, short *error,
unsigned short ibuf[7]); /* returns Common Request List data */
void dpftd(unsigned short *irinx, unsigned short *ftd,
short *error); /* change the FTD for a datapool entry */
void dpget(unsigned short *irinx, char indata[], short *error,\
unsigned short *seqnum, unsigned short *maxlen=NULL,
unsigned short *mrkdel=NULL); /* get datapool data */
void dpieee(double *xieee, float *xdec, char *ind);
void dpm_verify_free_space(void); /* verify free space is okay */
void dpproc(short *error, short *ignored_event_flag=NULL); /* process datapool requests */
void dprall(void); /* remove all datapool requests */
void dprem(unsigned short *irinx, short *error); /* remove a datapool request */
void dpreq(unsigned int *di, unsigned char *pi,
unsigned short *irinx, short *error,
unsigned short *iftd=NULL,
unsigned short *length=NULL,
unsigned short *ioff=NULL,
DBAREQ_INFO *dbareq=NULL); /* request datapool data */
void dpset(unsigned short *irinx, char idata[],
unsigned char *iqueue, short *error,
unsigned short *length=NULL,
unsigned short *ioff=NULL); /* send datapool data */
void dpsrpy(short *error, short *iarray=NULL,
unsigned short *itmo=NULL,
unsigned char *nofield=NULL); /* send queued settings and wait for reply */
unsigned short dp_get_ftd(void);
void dstatx(void *raw_data, PDB_STS *pdb,
XCHAR *status_text, int *ret_ramp_dc=(int *)NULL); /* convert device status to ASCII */
int env_is_acnet_in_a_box(void);
void errhlp(short *status, short *passed_top_row=(short *) NULL,
short *passed_num_rows=(short *) NULL,
short *passed_left_column=(short *) NULL,
short *passed_num_columns=(short *) NULL); /* display extended error info */
void errhlp_c(short *status, int passed_top_row=0,
int passed_num_rows=0,
int passed_left_column=0,
int passed_num_columns=0); /* display extended error info */
int event_callback_init_c(int event_number, int event_type,
clock_event_handler callback_func,
void *func_data, char *handle,
unsigned int options, int *callback_id);
int event_callback_term_c(int callback_id);
unsigned int event_count_c(int event,
unsigned int *count_f=(unsigned int *) NULL,
unsigned int *count_2=(unsigned int *) NULL,
unsigned int *usec_offset=(unsigned int *) NULL);
int event_history(int, int, int*, int);
int event_last_timestamp_c(int event,
unsigned int *seconds=(unsigned int *) NULL,
unsigned int *nanoseconds=(unsigned int *) NULL,
unsigned int options=CLOCK_OPT_NONE);
int event_set_fake(unsigned char event); /* make fake clock event */
int event_translate_c(int event_type, int event, int *absolute_event);
void evmon(unsigned char *event, int *ticks_since,
unsigned short *timestamp,
unsigned short *delta_timestamp); /* get clock event occurrence info */
void evmon0(unsigned char *event, unsigned int **ticks_ptr,
unsigned short **tstamp_ptr, unsigned short **delt_ts_ptr);
void evmon_plot_info_c(int event, unsigned int *event_02_count,
unsigned int *timestamp,
unsigned int *curr_02_count,
unsigned int *curr_timestamp);
void evmon_usec_c(int event, unsigned int *ticks_since,
unsigned int *time_since, unsigned int *timestamp,
unsigned int *num_02_events, unsigned int *timestamp_02);
int extract_bit_field_c(void *value, int value_length, int start_bit,
int num_bits, void *field_value);
int fac_code_to_name_c(int facility, char *text);
int fac_name_to_code(char *text);
int file_open_dont_log(void);
void filli1(void *buffer, short *start, short *stop,
char *fill_char, char *passed_nodescr=(char *) NULL);
void filli2(void *buffer, short *start, short *stop,
short *fill_word);
void filli4(void *buffer, short *start, short *stop,
int *fill_longword);
int find_program_c(char *process_name, int *count,
PROGRAM_LOCATION *locations, int max_return);
short fndgen(int *rad50_generic, int *locations, short *max_return,
short *status);
void fpieee(float *xieee, float *xdec, char *ind);
int *framep(void); /* get pointer to stack frame */
void fsclos(short *vun, short *status,
int *ext_status=(int *)NULL, short *timeout=(short *)NULL); /* close an Fshare file */
void fsdel(short *vun, short *status,
int *ext_status=(int *)NULL,int *recno=(int *)NULL,short *passed_timeout=(short *)NULL); /* delete a record from an Fshare file */
int fshare_task_info(char *name, short *node, char *task_name);
void fsopen(short *vun, char *file_name, short *access,
short *status,
int *ext_status = (int *)NULL, short *dispose=(short *)NULL,
short *rdonly=(short *)NULL, short *passed_efn=(short *)NULL,
short *passed_timeout=(short *)NULL, void (*astfunc)()=(void(*)())NULL,
short *shared=(short *)NULL,int *max_record=(int *)NULL); /* open an Fshare file */
void fsrdm(short *vun, char *iobuf, short *record_size,
short *status,
int *ext_status=(int *)NULL,int *recno=(int *)NULL,short *nrrtn=(short *)NULL,
short *passed_efn=(short *)NULL,short *passed_timeout=(short *)NULL,
short *passed_nrecs=(short *)NULL,void (*astfunc)()=(void (*)())NULL); /* read multiple Fshare records */
void fsread(short *vun, void *iobuf, short *nbyte,
short *status,
int *ext_status=(int *)NULL,int *recno=(int *)NULL,
short *passed_nbrtn=(short *)NULL,short *passed_efn=(short *)NULL,
short *passed_timeout=(short *)NULL,short *nolock=(short *)NULL,
char *nodescrip=(char *)NULL,void (*astfunc)()=(void(*)())NULL); /* read a record from an Fshare file */
void fsinfo(short *vun, FS_FILE_INFO *iobuf_arg, short *iostat,
int *ext_status = 0, short *passed_efn = 0,
short *passed_timeout = 0, void (*astfunc)() = 0);
void setReturnActualKey(bool);
void fsrew(short *vun, short *status,
int *ext_status=(int *)NULL, short *timeout=(short *)NULL); /* rewind an Fshare file */
int fstplt(short *type, short *row, short *col,
short *diag = (short *) NULL,
unsigned int *passed_options = (unsigned int *) NULL); /* interface to FTP package */
int fstplt_c(short iptype, short irow, short icol,short diag = 0,
unsigned int options = FTP_OPT_NONE);
void fsunlk(short *vun, short *status,
int *ext_status=(int *)NULL, short *timeout=(short *)NULL); /* unlock an Fshare file */
void fswadc(short *iostat=(short*)NULL); /* obsolete */
void fswain(short *work_buffer = (short *)0, short *length = (short *)0, short *iostat=(short *)NULL); /* obsolete */
void fsweof(short *vun, short *status,
int *ext_status=(int *)NULL, short *timeout=(short *)NULL); /* write an EOF to an Fshare file */
void fswrit(short *vun, void *iobuf, short *nbyte,
short *status,
int *ext_status=(int *)NULL,int *recno=(int *)NULL,short *passed_efn=(short *)NULL,
short *passed_timeout=(short *)NULL,
short *nomod=(short *)NULL,char *nodescrip=(char *)NULL,void (*astfunc)()=(void (*)())NULL); /* write a record to an Fshare file */
void fsnode(short *node, short *status);
int fs_log_write_message(char *string);
int fs_log_file_writes_c(int log_it);
int fs_task_name(int *new_task_name);
void ftpplt(short *type, short *row, short *col); /* fast time plot package */
int gas_crates_and_slots_c(int node, short *crates, short *slots);
int gas_house_code_to_node_c(int node, int house_code, int *actual_node);
int gas_house_list_c(int node, int *num_houses, int max_return,
char *house_names, int *house_codes,
int *actual_nodes);
int gas_house_to_node_c(int node, char *house, int *actual_node);
void generic_message_init(void *message);
void getcmd(char *command_buffer, short *status, short const *len=NULL);
void getcmd_c(char *command_buffer, short *error, int buffer_length=0);
void gettim(rsx_time *);
#define get_ACNET_event_flag get_acnet_event_flag
unsigned int get_acnet_event_flag ( void );
int get_console_instance(void);
int get_global_camac_node_c(int node, int *global_node);
short get_lxcent_node(void);
int get_setpriv(int passed_check_only=FALSE);
int go_to_index_page(void);
int graphics_window_to_index_c(int window_id);
short gsaddr(short *row, short *column, short *node,
short *house, short *module_type, short *changed);
void gsadr1(short *node_row, short *node_column, short *house_row,
short *house_column, short *module_row, short *module_column);
short gsadr2(short *node, short *house, short *module_type);
void gsboot(short *house, short *module_type,
short *status, short *passed_node = (short *)NULL); /* reboot a smart module */
void gschk(short *data_buffer, short *status); /* check for new GAS list data */
void gsget(short *volbuf, char *data_buffer, short *seq_num,
short *length, short *offset, short *status); /* get GAS list data */
void gsgetw(short *volbuf, char *data_buffer, short *seq_num,
short *length, short *offset, short *status); /* wait for and get GAS list data */
void gslend(short *data_buffer, short *status); /* cancel a GAS list */
void gslist(short *house, short *module_type,
short *num_stancs, short *gas_ftd,
short stancs[][4], short *data_buffer,
short *event_flag, short *status, short *passed_node = (short *)NULL); /* send a GAS list */
void gsmod(char *names, short *max_return, short *passed_node = (short *)NULL,short *stat_arg = (short *)NULL); /* retrieve GAS types for a given front end */
void gsread(short *house, short *module_type, short *stanc,
char *data_buffer, short *event_flag,
short *status, short *passed_node = (short *)NULL); /* perform a one shot GAS read */
void gsset(short *house, short *module_type, short *stanc,
char *set_data, short *event_flag,
short *status, short *passed_node = (short *)NULL); /* make a GAS setting */
void gstanc(short *type, short *aspect, short *entry_num,
short *count, short *byte_count,
short *seq_flag, short *stanc); /* build a STANC */
void hdcopy(short *slot, short *que=(short *)NULL, char *hd_title=(char *)NULL, short *size=(short *)NULL,
short *yelblu=(short *)NULL, short *blkwht=(short *)NULL, short *bold=(short *)NULL, short *console=(short *)NULL); /* makes program-generated hard copies */
void hlpsub(short *); /* inform CNSHELP about the current subpage */
int house_name(char *house_code, char *house_name, unsigned short *node=NULL); /* convert house code to name */
void hscode(char *house_name, short *house_code,
short *translation,
short *passed_node = (short *)NULL, short *ret_status = (short *)NULL); /* convert between house names and codes */
void hscodx(char *name, short *house_code,
short *op_code); /* convert between house name and code for B0 and D0 */
int html_extract_anchor(char **html_text, int max_anchor_length,
char *anchor_text, int max_label_length,
char *label_text);
int html_extract_colored_text(char *html_text, int max_length,
int start_color, XCHAR *xchar_text,
int *end_color);
int html_extract_text(char *html_text, int max_length, char *ascii_text,
int *possible_continuation=(int *) NULL);
int html_page_to_file(char *url, char *file_name);
#ifdef __cplusplus
short iavdef(...); /* get analog alarm limit definition */
#else
short iavdef(); /* get analog alarm limit definition */
#endif
short icshft(short *, short *); /* rotate a word value */
int ieee_to_dec_float_c(void *ieee, void *dec, int num_values,
unsigned int options);
short ierrtv(short *acnet_error, char *row, char *column);
void ierrtx(ACNET_ERR *, short *, char *);
int imsure(short *, short *, short *);
int in_clibshr(void (*function)());
short index_page_pa(char *page_number);
int index_page_title_c(char *page_names, char *titles, int num_pages);
void intype(short *type, short *row, short *col, unsigned int *flags=(unsigned int *)NULL);
void intype_again(short *type, short *row, short *col);
short intype_callback_init(intype_callback_function callback_func,
unsigned char priority=0,
char *handle=(char *) NULL);
void intype_callback_term(short *index);
int intype_disable_hotkeys(int disable_flag);
void intype_put_rowcol(short *row, short *col);
void iomac(short *mac, short *type_code, char *data_buffer,
short *num_words, short *error);
int is_acnet_error_c(int value);
int is_camac_node_c(int node);
int is_component_camac_node_c(int global_node, int component_node);
int is_day_of_week_string_c(char *string, int string_length=0,
int want_full_name=FALSE);
int is_epicure_node_c(int node);
int is_generic_message(void *message, int *message_type);
int is_linear_common_transform_c(int common_index);
int is_linux(void);
int is_month_string_c(char *string, int string_length=0,
int want_full_name=FALSE);
int is_split_camac_node_c(int node);
int is_string_common_transform_c(int common_index);
int is_unscalable_primary_transform_c(int primary_index);
int is_valid_application_c(char *names, int num_programs, int *is_valid);
int is_valid_fermi_ascii_character_c(int chr);
int is_valid_username(char *username);
int is_valid_user(char *passed_username,bool nonuser_valid = false);
short itvatt(char *fcolor=(char *) NULL, char *bcolor=(char *) NULL,
char *blink=(char *) NULL);
int julian_date_to_clinks_c(double julian_date, unsigned int *clinks);
unsigned int k15hz(void);
int kerberos_get_principal(char *principal, char *realm=(char *) NULL);
int labinh(char *raw_data, short *error,
unsigned long *units_text=(unsigned long*)NULL); /* is this alarm's abort inhibited? */
int labsel(char *raw_data, short *error,
unsigned long *units_text=(unsigned long*)NULL); /* does this alarm cause an abort? */
int lalarm(char *raw_data, short *error,
unsigned long *units_text=(unsigned long*)NULL); /* is this in alarm? */
int lbypas(char *raw_data, short *error,
unsigned long *units_text=(unsigned long*)NULL); /* is this alarm bypassed? */
int lckarg(int *, char *); /* check for the presence of a given argument */
int lckclk(unsigned char *event); /* check for the occurrence of a TCLK event */
int lckclk_c(int event); /* check for the occurrence of a TCLK event */
unsigned int *lckclk_allocate(void); /* get a clock watcher id */
int lckclk_api(unsigned int *watcher_id, int event); /* check for the occurrence of a TCLK event */
void lckclk_free(unsigned int *watcher_id);
int lcktrm(void); /* check to see if a termination request is pending */
int ldvon(int *status_data, char *pdb, short *error,
char *units_text=(char *) NULL); /* is this device on? */
int ldvpos(int *status_data, char *pdb, short *error,
char *units_text=(char *) NULL); /* is this device positive? */
int ldvramp(int *status_data, char *pdb, short *error,
char *units_text=(char *) NULL); /* is this device ramping? */
int ldvrdy(int *status_data, char *pdb, short *error,
char *units_text=(char *) NULL); /* is this device ready? */
int ldvrem(int *status_data, char *pdb, short *error,
char *units_text=(char *) NULL); /* is this device in remote? */
int lenchs(char const *string, short *max_length=(short *) NULL); /* get the length of a string */
int lenchs_c(char const *string, int max_length=80); /* get the length of a string */
void lexvalues(short *, short *, short *, short *, short *, short *);
int lex_draw_display_c(char *file_name, int image_number,
int display_type);
int lex_draw_size_c(char *file_name, int image_number,
int *width, int *height);
int lex_object_display_c(char *object_name, int x, int y,
int rotation, int param1, int param2,
int param3, int param4, int param5,
int param6);
int lex_sa_find_acl_scripts_c(char *script_name, int exact_match,
int *num_matches,
LEXT_PROG_ACL_SCRIPT_MATCH_INFO **script_info);
int lex_sa_find_device_c(int device_index, int *num_matches,
LEXT_PROG_DEVICE_MATCH_INFO **device_info);
int lex_sa_get_devices(char *lex_sa_name, int *num_devices,
LEXT_PROG_DEVICE_INFO **device_info);
int lex_sa_get_info_c(int num_lex_sas, char *lex_sa_names, short *errors,
LEXT_PROG_INFO *lex_sa_info);
int lib_sleep(vmstime *time);
int lib_sleep_millisecs(int *milliseconds);
int lib_sleep_seconds(int *seconds);
int litapc(void); /* is this a privileged console? */
int log_camac_write_c(short node, int crate, int slot, int subaddress,
int function, int data);
int logger_check_alive(unsigned int *time_start,
unsigned int *time_restart, int *log_rate);
int logger_devices_from_node_c(int node, int logger_node,
char *event_string,
unsigned int *num_found,
LOGGER_SEARCH_DATA **found_devices,
unsigned int options=LOGGER_OPT_NONE);
int logger_find_deleted_device_c(char *device_name, char *event_string,
unsigned int *num_found,
LOGGER_SEARCH_DELETED_DATA **found_devices,
int req_node=0, unsigned int start_date=0,
unsigned int end_date=0,
unsigned int options=LOGGER_OPT_NONE);
int logger_find_device_c(char *device_name,
char *event_string,
unsigned int *num_found,
LOGGER_SEARCH_DATA **found_devices,
int req_node=0,
unsigned int options=LOGGER_OPT_NONE);
int logger_find_device_list_entries_c(char *device_name, char *event_string,
unsigned int *num_found,
LOGGER_SEARCH_DATA **found_devices,
int req_node=0,
unsigned int options=LOGGER_OPT_NONE);
int logger_find_fastest_node_by_name_c(char *device_name,
unsigned short *node,
unsigned int *delta_millisec=(unsigned int *) NULL);
int logger_free_memory(void);
int logger_get_array_device_c(int device_index, short property,
int array_index, int num_elements,
unsigned short node, unsigned int time,
unsigned int *timestamp,
unsigned int *delta_timestamp,
unsigned int *timestamps, float *values,
void *sample_spec, int sample_type,
int sda_case, int sda_set,
int sda_final_data,
unsigned int options,
unsigned short *ret_actual_node);
int logger_get_device_c(int device_index, int property,
unsigned short node,
unsigned int start_time, unsigned int end_time,
unsigned int min_delta_time,
unsigned int **ret_timestamps, float **ret_values,
unsigned int *num_points,
int_function_voidp update_func, int array_index,
int num_skip = 0,int skip_offset = 0,void *sample_spec = (void *)NULL,
int sample_type = LOGGER_SAMPLE_TYPE_NONE,
int sda_case = LOGGER_ALL_SDA_CASES,
int sda_set = LOGGER_ALL_SDA_SETS,int sda_final_data = LOGGER_FINAL_SDA_DATA,
unsigned int options = LOGGER_OPT_NONE,unsigned short *ret_actual_node = (unsigned short *)NULL);
int logger_get_device_by_name_c(char *device_name,
unsigned short node,
unsigned int start_time,
unsigned int end_time,
unsigned int min_delta_time,
unsigned int **ret_timestamps,
float **ret_values,
unsigned int *num_points,
int_function_voidp update_func,
int num_skip = 0,int skip_offset = 0,
void *sample_spec = (void *)NULL,
int sample_type = LOGGER_SAMPLE_TYPE_NONE,
int sda_case = LOGGER_ALL_SDA_CASES,
int sda_set = LOGGER_ALL_SDA_SETS,int sda_final_data = LOGGER_FINAL_SDA_DATA,
unsigned int options = LOGGER_OPT_NONE,unsigned short *ret_actual_node = (unsigned short *)NULL);
int logger_get_device_events_c(char *device_name, unsigned int node,
unsigned int *num_found,
char **event_string);
int logger_get_device_info_c(char *device_name, int req_node,
int req_listid, char *event_string,
unsigned int *num_found,
LOGGER_DEVICE_LOG_DATA **found_device_info);
int logger_get_device_list_c(int *device_indices,
int *array_indices,
short *properties,
unsigned short *nodes,
unsigned int start_time, int num_devices,
unsigned int *timestamps, float *values,
short *errors,
void *sample_spec=(void *) NULL,
int sample_type=LOGGER_SAMPLE_TYPE_NONE,
int sda_case=LOGGER_ALL_SDA_CASES,
int sda_set=LOGGER_ALL_SDA_SETS,
int sda_final_data=LOGGER_FINAL_SDA_DATA,
unsigned int options=LOGGER_OPT_NONE,
unsigned short *ret_actual_nodes=(unsigned short *) NULL);
int logger_get_existing_loggers(int *num_loggers,
char **logger_names=(char **) NULL,
int **nodes=(int **) NULL);
int logger_get_logged_devices_c(int node, int list,
unsigned int *num_devices,
ARRAY_DEVICE_DATA_EXT **devices);
int logger_is_array_retrieval_node_c(int node);
int logger_is_client_data_retrieval_node_c(int node);
int logger_is_client_logging_node_c(int node);
int logger_list_daq_stats_c(int node, int list_id, int *num_entries,
LOGGER_LIST_DAQ_STATS_DATA **daq_stats,
unsigned int options);
int logger_list_data_event_info_c(int node,int list,int max_return,int *rpy_num,
LOGGER_LIST_DATA_EVENT_INFO *data_event_info);
int logger_list_device_stats_c(int node, int list_id,
LOGGER_LIST_DEVICE_STATS_DATA *device_stats,
unsigned int options=LOGGER_OPT_NONE);
int logger_list_info_c(int node, int list_id, LOGGER_LIST_DATA *list_info,
unsigned int options=LOGGER_OPT_NONE);
int logger_log_array_device_c(int node, char *device_name,
unsigned int timestamp,
unsigned int milliseconds, int error_status,
int num_values, void *values,
unsigned int options);
int logger_log_control_values_c(int node, int num_devices,
unsigned int timestamp, char *device_names,
int *commands, short *errors,
unsigned int options);
int logger_log_device_list_c(int node, int num_devices,
unsigned int timestamp,
unsigned int milliseconds,
char *device_names,
double *values, short *errors,
unsigned int options=LOGGER_OPT_NONE);
int logger_log_devices_c(int node, int num_devices,
unsigned int timestamp, char *device_names,
float *values, unsigned int options);
int logger_name_to_node(char *logger_name, int *ret_status=(int *) NULL);
int logger_read_array_device_c(int device_index, short property,
int array_index, int num_elements,
unsigned short node,
unsigned int sample_time,
unsigned int sample_nanos,
unsigned int *first_time,
unsigned int *first_nanos,
unsigned int *delta_timestamp,
unsigned int *timestamps,
unsigned int *nanoseconds, double *values,
void *sample_spec=(void *) NULL,
int sample_type=LOGGER_SAMPLE_TYPE_NONE,
int sda_case=LOGGER_ALL_SDA_CASES,
int sda_set=LOGGER_ALL_SDA_SETS,
int sda_final_data=LOGGER_FINAL_SDA_DATA,
unsigned int options=LOGGER_OPT_NONE,
unsigned short *ret_actual_node=(unsigned short *) NULL);
int logger_read_array_device_multiple_c(int device_index, short property,
int array_index, int num_elements,
unsigned short node,
unsigned int start_time,
unsigned int start_nanos,
unsigned int end_time,
unsigned int end_nanos,
unsigned int min_delta_time,
int num_skip,
int num_arrays_limit,
unsigned int **timestamps,
unsigned int **nanoseconds,
double **values,
unsigned int *num_arrays,
void *sample_spec=(void *) NULL,
int sample_type=LOGGER_SAMPLE_TYPE_NONE,
int sda_case=LOGGER_ALL_SDA_CASES,
int sda_set=LOGGER_ALL_SDA_SETS,
int sda_final_data=LOGGER_FINAL_SDA_DATA,
unsigned int options=LOGGER_OPT_NONE,
int_function_voidp update_func=(int_function_voidp) NULL,
unsigned short *actual_node=(unsigned short *) NULL);
int logger_read_array_device_multiple_by_name_c(char *device_name,
unsigned short node,
unsigned int start_time,
unsigned int start_nanos,
unsigned int end_time,
unsigned int end_nanos,
unsigned int min_delta_time,
int num_skip,
int num_arrays_limit,
unsigned int **timestamps,
unsigned int **nanoseconds,
double **values,
unsigned int *num_arrays,
void *sample_spec=(void *) NULL,
int sample_type=LOGGER_SAMPLE_TYPE_NONE,
unsigned int options=LOGGER_OPT_NONE,
int_function_voidp update_func=(int_function_voidp) NULL,
unsigned short *actual_node=(unsigned short *) NULL);
int logger_read_array_device_status_c(int device_index, int array_index,
int num_elements, unsigned short node,
unsigned int sample_time,
unsigned int sample_nanos,
unsigned int *first_time,
unsigned int *first_nanos,
unsigned int *delta_timestamp,
unsigned int *timestamps,
unsigned int *nanoseconds,
int *on_states, int *ready_states,
int *remote_states,
int *positive_states,
int *ramp_states,
XCHAR *status_text=(XCHAR *) NULL,
void *sample_spec=(void *) NULL,
int sample_type=LOGGER_SAMPLE_TYPE_NONE,
int sda_case=LOGGER_ALL_SDA_CASES,
int sda_set=LOGGER_ALL_SDA_SETS,
int sda_final_data=LOGGER_FINAL_SDA_DATA,
unsigned int options=LOGGER_OPT_NONE,
unsigned short *ret_actual_node=(unsigned short *) NULL);
int logger_read_device_c(int device_index, int property, int array_index,
unsigned short node, unsigned int start_time,
unsigned int start_nanos, unsigned int end_time,
unsigned int end_nanos,
unsigned int min_delta_time,
int num_skip, int skip_offset,
void *sample_spec, int sample_type,
int sda_case, int sda_set, int sda_final_data,
unsigned int options,
unsigned int **ret_timestamps,
unsigned int **ret_nanoseconds,
double **ret_values, unsigned int *num_points,
int_function_voidp update_func=(int_function_voidp) NULL,
unsigned short *ret_actual_node=(unsigned short *) NULL);
int logger_read_device_by_name_c(char *device_name,
unsigned short node,
unsigned int start_time,
unsigned int start_nanos,
unsigned int end_time,
unsigned int end_nanos,
unsigned int min_delta_time,
int num_skip, int skip_offset,
void *sample_spec, int sample_type,
unsigned int options,
unsigned int **ret_timestamps,
unsigned int **ret_nanoseconds,
double **ret_values,
unsigned int *num_points,
int_function_voidp update_func=(int_function_voidp) NULL,
unsigned short *ret_actual_node=(unsigned short *) NULL);
int logger_read_device_list_c(int *device_indices, int *array_indices,
short *properties, unsigned short *nodes,
unsigned int start_time,
unsigned int start_nanos,
int num_devices, unsigned int *timestamps,
unsigned int *nanoseconds, double *values,
short *errors,
void *sample_spec=(void *) NULL,
int sample_type=LOGGER_SAMPLE_TYPE_NONE,
int sda_case=LOGGER_ALL_SDA_CASES,
int sda_set=LOGGER_ALL_SDA_SETS,
int sda_final_data=LOGGER_FINAL_SDA_DATA,
unsigned int options=LOGGER_OPT_NONE,
unsigned short *ret_actual_nodes=(unsigned short *) NULL);
int logger_read_device_status_list_c(int *device_indices,
int *array_indices,
unsigned short *nodes,
unsigned int start_time,
unsigned int start_nanos,
int num_devices,
unsigned int *timestamps,
unsigned int *nanoseconds,
int *on_states, int *ready_states,
int *remote_states,
int *positive_states, int *ramp_states,
XCHAR *status_text, short *errors,
void *sample_spec=(void *) NULL,
int sample_type=LOGGER_SAMPLE_TYPE_NONE,
int sda_case=LOGGER_ALL_SDA_CASES,
int sda_set=LOGGER_ALL_SDA_SETS,
int sda_final_data=LOGGER_FINAL_SDA_DATA,
unsigned int options=LOGGER_OPT_NONE,
unsigned short *ret_actual_nodes=(unsigned short *) NULL);
int logger_restart_lists(int log_rate);
int logger_return_data(LOGGER_DATA *request_reply);
int logger_return_names(short *list_id,
char device_names[LOGGER_DEVICES_PER_LIST][C_STYLE_LONG_DEVICE_NAME_LEN],
int *disp_indices=(int *) NULL,
unsigned int options=LOGGER_OPT_NONE);
int logger_set_remaining_memory_limit_c(int percentage);
int logger_setnode(unsigned short *node);
int logger_shutdown(void);
int logger_start_plot_c(int console, int slot,
LOG_PAGE_INFO *sa_inform,
LOG_DEVICE_INFO *x_device,
int num_y_devices,
LOG_DEVICE_INFO *y_devices, short *err_dev );
int loggers_on_node_c(int node, int *num_loggers, char **logger_names,
unsigned int options=LOGGER_OPT_NONE);
#ifdef __cplusplus
short lrdast(short *icntrl=(short *)NULL); /* check to see if there any queued messages for this task */
#else
short lrdast(); /* check to see if there any queued messages for this task */
#endif
int lsw(short *); /* is this switch on? */
int lswoff(short *); /* has this switch turned off? */
int lswon(short *); /* has this switch turned on? */
void lx_allslots(void);
void lx_define_color(unsigned char color, unsigned short red,
unsigned short green, unsigned short blue);
void lx_get_title(char *title_text, unsigned char *hc_mode);
void lx_wait_q_empty(void);
void lxarc(short *xc, short *yc, short *radius,
short *start, short *count,
unsigned char *kolor=(unsigned char *) NULL,
unsigned char *filled=(unsigned char *) NULL); /* draw an arc */
void lxbmov(short *xuls, short *yuls, short *xuld,
short *yuld, short *delx, short *dely,
short *bcolor, short *flags); /* perform a block pixel move */
void lxbord(short *border_width); /* set widths for rectangles and circles */
void lxbrat(short *rate); /* set graphic blink rate */
void lxcarc(short *xc, short *yc, short *radius,
short *start, short *arclen,
unsigned char *kolor=(unsigned char *) NULL); /* draw a circular arc */
void lxcatt(short *size,short *rotation=(short *) NULL,
short *additive=(short *) NULL,
short *video=(short *) NULL); /* set graphic text attributes */
int lxcint(void); /* get interrupt data from Lexidata */
void lxcir(short *xc, short *yc, short *radius,
unsigned char *kolor=(unsigned char *) NULL); /* draw a circle */
void lxclim(short *xmin, short *ymin, short *xmax,
short *ymax); /* set graphic cursor limits */
void lxclip(short *x1, short *y1, short *x2,
short *y2); /* set graphic clipping region */
void lxcmap(unsigned short *num_color, unsigned char *red,
unsigned char *green, unsigned char *blue,
unsigned char *cmap);
void lxctyp(unsigned char *type, unsigned char *blink,
unsigned char *pattrn=(unsigned char *) NULL,
short *npix=(short *) NULL,
unsigned char *ixcent=(unsigned char *) NULL,
unsigned char *iycent=(unsigned char *) NULL); /* establish the type of Lexidata cursor */
void lxcurs(unsigned char *mode, short *x, short *y); /* update the Lexidata cursor */
void lxcvec(unsigned char *mode, short *x, short *y,
unsigned char *kolor=(unsigned char *) NULL); /* draw a chained vector */
void lxelip(short *xc, short *yc, short *width,
short *height, short *start,
short *extent,
unsigned char *kolor=(unsigned char *) NULL); /* draw an ellipse */
void lxeras(unsigned char *mplans=(unsigned char *) NULL); /* erase the Lexidata */
void lxfill(unsigned char *mode, short *x, short *y,
unsigned char *kolor=(unsigned char *) NULL); /* draw a filled convex polygon */
void lxflsh(void); /* flush the Lexidata command buffer */
void lxhdwr(short *type);
void lximag(short *code, short *vun,
char *file_name, short *status,
short *image=(short *) NULL); /* display a stored Lex Draw image */
void lx_load_font(char *name);
void lxmode(unsigned char *mode); /* set the Lexidata drawing mode */
void lxobj(char *objnam, short *x, short *y,
short *irot=(short *) NULL,
short *i1=(short *) NULL,
short *i2=(short *) NULL,
short *i3=(short *) NULL,
short *i4=(short *) NULL,
short *i5=(short *) NULL,
short *i6=(short *) NULL); /* display a stored Lex Object */
void lxobjf();
int lxpaint_gif_image(char *file_name, int x, int y,
int leave_window=FALSE);
int lxpaint_image_size(char *filename, short *width, short *height);
int lxpaint_put_image(char *filename, short x, short y,
char color_map, char fit_it);
void lxpars(short *wmode, short *fmode=(short *) NULL,
short *tsize=(short *) NULL,
short *trotate=(short *) NULL,
short *tadditive=(short *) NULL,
short *treverse=(short *) NULL,
short *vwidth=(short *) NULL,
short *pattrn=(short *) NULL,
short *patsiz=(short *) NULL,
short *bwidth=(short *) NULL,
short *xwidth=(short *) NULL,
short *yheight=(short *) NULL);
void lxpatt(unsigned short *pattern, short *size); /* define a vector pattern */
void lxpfil(short *points, short *num_points,
unsigned char *kolor=(unsigned char *) NULL); /* draw filled polygons */
void lxpimg(short *x, short *y, short *width,
short *height, unsigned char *data); /* display image */
void lxpnt(short *x, short *y,
unsigned char *kolor=(unsigned char *) NULL); /* draw a point */
void lxpnts(short *num_points, short *xy_data,
unsigned char *kolor=(unsigned char *) NULL); /* draw a set of points */
void lxpsize(int pixel_size);
void lx_query_font(int *width, int *height,
int actual=0); /* get size in pixels of the current graphic font */
void lxrcmd(unsigned char *fill_mode); /* set rectangle/circle fill mode */
void lxrect(short *x1, short *y1, short *x2, short *y2,
unsigned char *kolor=(unsigned char *) NULL); /* draw a rectangle */
void lxrst(char const *title=NULL,
unsigned char const *hcmode=(unsigned char *) NULL,
unsigned char const *revert=(unsigned char *) NULL); /* reset a graphics window */
void lxslot(short *slot); /* select a window for graphical output */
void lxtext(short const *x, short const *y, char const *text,
short const *nchar,
unsigned char const *kolor=(unsigned char *) NULL); /* draw text on the Lexidata */
void lxtitl(char *title,
unsigned char *hcmode=(unsigned char *) NULL); /* set the title of a Lexidata window */
void lxvec(short *x1, short *y1, short *x2,
short *y2, unsigned char *kolor=(unsigned char *) NULL); /* draw a vector */
void lxvwid(short *width); /* set vector width */
void lxwin_iconify(short window_id); /* iconify an LX window */
void lxwin_lower(short window_id); /* push an LX window to the back */
void lxwin_raise(short window_id); /* pop an LX window to the top */
void lxwpos(int x_pos, int y_pos);
void lxwsiz(unsigned short *width,
unsigned short *height, char *maxdepth); /* set the size of a graphics window */
void lx2ss(void); /* copy Lexidata to 614 */
int mail_file_c(char *file_name, char *email_address,
char *subject, unsigned int options,
char *sender=(char *) NULL);
int mail_send(char *mail_to_user, char *mail_subject_line,
char *mail_message, char *mail_file,
char *sender=(char *) NULL);
int mail_send_message(char *mail_to_user,
char *mail_subject_line,
char *mail_message, char *mail_file,
char *sender=(char *) NULL);
int mail_send_image(char *mail_to_user,
char *mail_subject_line,
char *mail_file,
char *sender=(char *) NULL);
int email_send_message(char const *mail_to_user,
char const *mail_subject_line,
char const *mail_message, char const *mail_file,
char const *sender=(char *) NULL);
int email_send_image(char const *mail_to_user,
char const *mail_subject_line,
char const *mail_file,
char const *sender=(char *) NULL);
int make_columnar_file_c(char *file_name, unsigned int options,
int num_columns, int *column_position,
DELIMITED_FILE_FORMAT_DATA *column_formats,
char **column_names, int *num_rows,
int **data_flags,
void *column_1_data, ...);
int make_delimited_file_c(char *file_name, int file_type,
int delimiter, unsigned int options,
int num_columns,
DELIMITED_FILE_FORMAT_DATA *column_formats,
char **column_names, int *num_rows,
int **data_flags,
void *column_1_data, ...);
int make_delimited_file_ext_c(char *file_name, int file_type,
int delimiter, unsigned int options,
int num_columns,
DELIMITED_FILE_FORMAT_DATA *column_formats,
char **column_names, int *num_rows,
int **data_flags, void **column_data);
int maxtol(char *raw_data, short *error, ulong *units=NULL); /* return an alarm MAX/TOL field */
int mdat_frame_info_c(int frame_number, MDAT_FRAME_INFO *frame_info);
unsigned long long milliseconds_now(void);
int minnom(char *raw_data, short *error, ulong *units=NULL); /* return an alarm MIN/NOM field */
void movbin(void *source_buffer, short *source_index,
void *dest_buffer, short *dest_index,
short *num_bytes); /* move a set of bytes */
void moveby(void *source_buffer, short *source_index,
void *dest_buffer, short *dest_index,
short *num_bytes, char *nodescr=(char *)0); /* move a set of bytes */
void movewd(void *source_buffer, short *source_index, void *dest_buffer,
short *dest_index, short *num_words); /* move a set of words */
void movex(char *source, short *source_index, XCHAR *dest,
short *dest_index, short *num_char, char *color);
void movex_c(char *source, int source_index, XCHAR *dest,
int dest_index, int num_char, int color);
void mrkcan(void); /* cancel MRKTMR AST */
void mrktmr(short *delay, void_function ast_func); /* set up a time delayed AST */
void my_ascii_name(char *process_name, int get_current);
int my_current_user_email(char *email);
int my_current_user_name(char *user_name);
int my_executable_name_c(char *name, int generic_name); /* get the executable name for the present task */
int my_full_process_name(char *name);
int my_gen_name(void); /* get the present generic task name */
void my_generic_ascii_name(char *process_name);
int my_host_name_c(char *host_name, int max_return=0);
int my_program_name_c(char *name); /* get the program name for the present task */
int my_system_info_c(char *host_name, char *domain_name, char *system,
char *release, char *version, char *machine,
int max_return=0);
int my_user_name(char *user_name);
int myconsole(void);
int myconsole_set_c(int console_number);
int myinstance(void);
void myname(int *task_name,int get_current = FALSE); /* get the present task name */
int myname_set(char *task_name);
short mynode(void);
int mypage(char *passed_page_text=NULL);
int myslot(void); /* get the present task slot number - 1,5,9 for PA,PB,PC*/
int myslot_index(void); /* get the present task slot index - 0,1,2,... not 1,5,9,... */
char myslot_letter(void); /* get the present task slot letter - A,B,C,... */
int myslot_set_c(int slot);
int nam2di(char *name, int *device_index, char *work_area=(char *) NULL,
short *numdev=(short *) NULL); /* convert device name to DI */
short namnod(char const *node_name); /* get ACNET node ID */
short namnod_c(char *node_name); /* get ACNET node ID */
#ifdef __cplusplus
int narg(...); /* get the length of an argument list */
#else
int narg(); /* get the length of an argument list */
#endif
short nodnam(short *node, char *node_name); /* get ACNET node name */
short nodnam_c(short node, char *node_name); /* get ACNET node name */
int nonconsole_program_init(void);
int numcns(void); /* get your console number */
void others(int *, short *); /* find other consoles running this program */
void clib_pause(short *delay); /* wait for n 15ths of a sec */
void pause_c(int delay); /* wait for n 15ths of a sec */
void pausen(short *delay); /* wait for n 15ths of a sec */
int pa_to_index_page_c(int pa_number, char *page_name,
int max_return=CPLD_MAX_PAGES);
int pdb_scaling_table_limits_c(int common_index, int table_number,
double *primary_minimum,
double *primary_maximum,
double *minimum, double *maximum);
int pdb_valid_length_c(int primary_index, int length);
float pdcupu(float const *common_value, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from common to primary units */
double pdcupu_ext(double common, PDB_RS_EXT const *pdb, short *error,
char *units_text=(char *) NULL); /* convert from common to primary units */
double pdcupu8(double const *common_value, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from common to primary units */
int pdcuud(float const *common_value, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from common units to unscaled data */
int pdcuud_ext(double common, PDB_RS_EXT const *pdb, short *error,
char *units_text=(char *) NULL); /* convert from common units to unscaled data */
int pdcuud8(double const *common_value, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from common units to unscaled data */
unsigned short pdimax(void); /* get maximum scaling indices */
double pdpucu(float const *primary_value, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from primary to common units */
double pdpucu_ext(double primary_value, PDB_RS_EXT const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from primary to common units */
int pdpuud(float const *primary_value, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from primary units to raw data */
int pdpuud_ext(double primary_value, PDB_RS_EXT const *pdb, short *error,
char *units_text=(char *) NULL); /* convert from primary units to raw data */
int pdpuud8(double const *primary_value, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from primary units to raw data */
double pdudcu(void const *raw_data, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from raw data to common units */
double pdudcu_ext(void const *unscaled_value, PDB_RS_EXT const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from raw data to common units */
double pdudpu(void const *raw_data, PDB_RS const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from raw data to primary units */
double pdudpu_ext(void const *unscaled_value, PDB_RS_EXT const *pdb,
short *error, char *units_text=(char *) NULL); /* convert from raw data to primary units */
short pdulen(PDB_RS const *pdb, short *error); /* default unscaled data length */
void pd_dpyfmt(PDB_RS *pdb, char *length_format,
char *scientific_format); /* get display format flags from PDB */
int program_is_pa(void);
int program_is_sa(void);
void r50asc(short *nchar, int *task, char *task_name);
int rad50(char const* task_name);
void rdcurs(short *row, short *column); /* read text cursor position */
void rdspe(short *row, short *column, short *num_chars,
float *minimum, float *maximum, float *value,
short *status); /* convert and range check a real */
void rdspi(short *row, short *column, short *num_chars,
short *minimum, short *maximum, short *value,
short *status); /* convert and range check a short integer */
void rdspi_c(int row, int column, int num_chars,
int minimum, int maximum, short *value,
short *status); /* convert and range check a short integer */
void rdspi4(short *row, short *column, short *num_chars,
int *minimum, int *maximum, int *value,
short *status); /* convert and range check an integer */
void rdspr(short *row, short *column, short *num_chars,
float *minimum, float *maximum, float *value,
short *status); /* convert and range check a real */
void rdspr_c(int row, int column, int num_chars,
double minimum, double maximum,
float *value, short *status); /* convert and range check a real */
void rdspr8(short *row, short *column, short *num_chars,
double *minimum, double *maximum,
double *value, short *status); /* convert and range check a double precision real */
int read_oac_config_info_c(char *name, OAC_CONFIG_INFO *oac_info,
short *errors, int num_oacs=1);
void readef(short *event_flag, short *status); /* read an event flag */
int reflected_events_c(int event_type, int *events, int num_events,
int *reflected_events);
int remote_program_available_methods(char *passed_program, int *num_methods,
REMOTE_METHOD_INFO **methods);
int remote_program_build_method_c(char *program_name, void *message,
int max_length, char *method,
char *method_object, char *method_qual,
REMOTE_COPY_DATA *copy_options,
int num_options, int terminate,
unsigned int *message_length);
int remote_program_build_script_c(char *program_name, void *message,
int max_length, char *script_name,
float replay_speed, int set_lock,
int fswrite_lock,
REMOTE_COPY_DATA *copy_options,
int num_options, int terminate,
unsigned int *message_length);
int remote_pgm_build_script_list_c(char *program_name,
void *message_buffer, int max_length,
char *script_file,
float replay_speed, int set_lock,
int fswrite_lock,
REMOTE_COPY_DATA *copy_options,
int num_options, int terminate,
unsigned int *ret_message_length);
int remote_program_caller_data(void *message,
REMOTE_PROGRAM_DATA *request_data,
char *process_name, int *node,
int *console, int *slot, int *reply_type);
int remote_program_check(void *message, int *type, int *subtype,
void **request_data,
unsigned int *request_length);
void remote_program_end_request_c(int request_status, void *reply_data,
int reply_length, int no_output=FALSE);
int remote_program_generate_output(void);
int remote_program_get_data(void *message,
REMOTE_PROGRAM_DATA *request_data);
int remote_program_get_method(void *message, char *method,
char *method_object, char *method_qual,
int *method_id);
int remote_program_get_script(void *message, do_script_t *script_data, char *script_list_file = (char *) NULL);
void rerase(short *node, short *screen, short *error);
void rstbit(char *lstrng, short *nbit); /* reset a bit in a byte string */
void rstbit_c(char *lstrng, int nbit); /* reset a bit in a byte string */
int running_current_clib(void);
int running_test_clib(void);
int run_remote_program_c(int console_number, int console_slot,
char *program_name, char *message,
int message_type, REMOTE_COPY_DATA *copy_options,
int num_options, int terminate,
PROGRAM_LOCATION *remote_location=(PROGRAM_LOCATION *) NULL,
void *aux_data=(void *) NULL);
int select_node_menu(short central_nodes, char *node_name,
short *node, short *instance,
short *ret_cnsnum = (short *) NULL,
int select_all_flag = FALSE);
int send_mail_to_program_keeper(char *subject, char *message);
int set_bit_field_c(void *value, int value_length, int start_bit,
int num_bits, void *field_value);
void set_rights_resource(char *rights_name, char enable); /* sets/clears VMS identifiers from process rights list */
int set4rd(char *); /* enable or disable settings */
#ifdef setbit /* also defined by sys/param.h */
#undef setbit
#endif
void setbit(char *lstrng, short *nbit); /* set a bit in a byte string */
void setbit_c(char *lstrng, int nbit); /* set a bit in a byte string */
void setef(short *event_flag,
short *ret_status=(short *) NULL); /* set an event flag */
int settings_callback_init_c(int num_devices, int *device_indices,
settings_handler callback_func,
void *callback_data=(void *) NULL);
int settings_callback_term_c(int num_devices, int *device_indices,
settings_handler callback_func,
void *callback_data=(void *) NULL);
unsigned int slash_date_to_clinks(char *date, int *status=(int *) NULL);
void sleep_millisecs_c(int milliseconds);
void sleep_seconds_c(int seconds);
int snpplt(short *iptype, short *irow, short *icol,
short *passed_diagfl=(short *) NULL,
unsigned int *passed_options=(unsigned int *) NULL);
int snpplt_c(short iptype, short irow, short icol, short diagfl=0,
unsigned int options=FTP_OPT_NONE);
int snp_set_sda_info_c(char *usage_text, int sda_file,
int sda_case, int sda_subcase);
int srcnct(short *error, short *node=(short *) NULL,
void *type=(void *) NULL); /* connect for reading save/restore data */
int srdcnt(void); /* disconnect from reading save/restore data */
int srderr(int *device_index, short *file_number, short *max_device,
char *work_area, short *irinx, short *error); /* get save file device errors */
int srdir(char *search_key, char *search_type,
short *filenum_seed, short *date_seed,
short *max_headers, short *max_bytes,
char *work_area, short *irinx,
short *error, char *passed_usage = (char *)NULL); /* get save file directory */
int srdisk(short *max_disk_areas, char *work_area,
short *irinx, short *error); /* get save/restore disk usage info */
int srget(short *irinx, char *work_area,
char *data_buffer, short *error,
short *passed_max_length=(short *) NULL,
short *ret_length=(short *) NULL); /* get saved data */
int srgeti(short *irinx, char *work_area,
short *word_index, short *error,
short *ret_length=(short *) NULL); /* get index to saved data */
int srmod(int *device_index, char *property, short *file_number,
char *work_area, short *irinx, char *idata,
short *error, short *length,
short *passed_offset=(short *) NULL); /* modify a save file */
int srproc(char *work_area, short *event_flag,
short *error); /* process requests for saved data */
int srreq(int *device_index, char *property,
short *file_number, char *work_area,
short *irinx, short *error,
short *passed_length=(short *) NULL,
short *passed_offset=(short *) NULL,
char *passed_usage=(char *)NULL,
short *passed_collection_alias=(short *) NULL,
short *passed_set_alias=(short *) NULL,
short *passed_file_offset=(short *) NULL,
short *passed_collection_offset=(short *) NULL,
short *passed_set_offset=(short *) NULL); /* request saved data */
int srsetp(short *file_number, unsigned short *protection,
short *error, char *passed_usage=(char *) NULL); /* modify a save file protection code */
int srsize(char *work_area, short *size, short *error); /* get amount of save work area in use */
void srsnapreq(int *device_index, char *property, short *user_id,
char *work_area, short *irinx, short *error,
short *uk1sys, short *uk2rec,
short *passed_len=(short *) NULL,
short *passed_ioff=(short *) NULL);
int srston(short *store_num, char *work_area,
short *irinx, short *error, char *passed_usage=(char *) NULL); /* get the save file # for a given store */
int srwain(char *work_area, short *length); /* init save work area */
void sscatt(short *isize, short *irot=(short *)NULL);
void sscurs(short *mode, short *ix, short *iy);
void sseras(void);
void ssflsh(void);
void ssline(short *ix1, short *iy1,short *ix2, short *iy2);
void sslgr(short *lgr);
void sspnt(short *ix, short *iy);
void ssrst(char *text);
void sstext(char *text, short *nchar,short *ix, short *iy);
void ssxax(short *iy, short *ix1, short *ix2);
void ssxygr(short *xygr);
void ssyax(short *ix, short *iy1, short *iy2);
int states_callback_init(int num_devices, int *device_indices,
states_handler callback_func,
void *handler_data=(void *) NULL);
int states_telldi(int, short, int, int*);
char *string_addr(char const *string); /* get actual string address from descriptor */
int submit_batch_job(char *queue_name, char *job_name,
char *command_file, char *log_file,
char *user_name, char **job_status,
int *entry_number);
int clib_swab(short *array, short *num_elements); /* swap high and low bytes of word array */
int swap_bytes_c(short *array, int num_elements);
int swap_bytes_longword_c(int *array, int num_elements);
int swap_longwords_c(void *array, int num_elements);
int swap_words_c(void *array, int num_elements);
void swclr(void); /* clear the touch panel */
void swcolr(char *swnum, char *fcolor=NULL); /* change touch panel switch text color */
void swdef(char *swnum, char *ulrow, char *ulcol,
char *lrrow, char *lrcol, char *flags); /* define a switch on the touch panel */
void swget(short *swnum, short *ulrow, short *ulcol,
short *lrrow, short *lrcol, short *flags); /* get the definition of a touch panel switch */
void swmuex(short *muxswd); /* handle mutually exclusive touch panel switches */
void swrect(char *swnum, char *fcolor=NULL); /* draw a rectangle on the touch panel */
void swsfmt(char *nrows, char *ncols); /* set the format of the touch panel */
void swtext(char *swnum, char *relrow, char *relcol,
char *text, short *nchars, char *fcolor=(char *) NULL,
char *bcolor=(char *) NULL,
char *blink=(char *) NULL); /* write text for a switch on the touch panel */
void swtvm(char *row, char *col, char *text,
short *nchars=(short *) NULL, char *fcolor=(char *) NULL,
char *bcolor=(char *) NULL, char *blink=(char *) NULL); /* display text on the touch panel */
void swtvmx(char *row, char *col, XCHAR *xtext, short *nchars); /* display color coded text on the touch panel */
void term(void); /* terminate the present program */
int ticks_since_event(int event); /* get 0F ticks since a clock event */
unsigned int traditional_date_to_clinks(char *date,
int *status=(int *) NULL);
char tstbit(char *lstrng, short *nbit); /* test a bit in a byte string */
char tstbit_c(char *lstrng, int nbit); /* test a bit in a byte string */
void tvmap(int x_offset, int y_offset);
void tvunmap(void);
int tv_window_to_index_c(int window_id);
void unmovex(XCHAR *source, short *source_index, char *dest,
short *dest_index, short *num_char); /* extract a character string from a TVMX buffer */
void upcase(char *string, short *passed_numchar=NULL);/* convert lower case to upper case */
void upcase_c(char *string, short passed_numchar=-1); /* convert lower case to upper case */
int user_default_directory(char *user_name, char *default_path,
char *default_dir);
int user_email_c(char *user_names, char *emails,
short *errors, int num_users);
void user_fshare_lock(void);
int user_fshare_lock_read(void);
void user_fshare_unlock(void);
int user_pref_key(char *user_key);
void user_sets_lock(void);
int user_sets_lock_read(void);
void user_sets_unlock(void);
short viabrt(char *vtname, unsigned short *node=NULL);/* abort a VAX application task */
short vistrt(char *vtname, unsigned short *node=NULL);/* start a VAX application task */
short vtabrt(char *vtname, unsigned short *node=NULL);/* abort a slaved VAX application task */
short vtcncl(short *vttsb); /* disconnect from a slaved VAX application task */
void vtstrt(char *vtname, short *vttsb, short *vtr50,
short *word_status,
unsigned short *node=NULL); /* start a slaved VAX application task */
void waitfr(short *event_flag,
short *ret_status=(short *)NULL); /* wait until a specified event flag is set */
void waitkb(short *, short *, short *, short *); /* wait for a user interrupt */
int whk_callback_init(int oac_class, void (*whk_handler)(int,int,int));
void who_started_me(char *process_name);
int wmenu(short *uprow, short *lftcol, short *nitems, short *nchars,
char *itmtxt, char *title, short *item,
short *passed_num_columns=(short *) NULL,
popup_menu_function *user_funcs= (popup_menu_function *)NULL,
void **func_data = (void **) NULL,
char *enabled_entries = (char *) NULL,
HELP_CALLBACK_DATA *help_data = (HELP_CALLBACK_DATA *) NULL); /* create a pop up menu */
int wmenu_c(int uprow, int lftcol, int nitems, int nchars, char *itmtxt,
char *title, short *item,
int num_columns=1,
popup_menu_function *user_funcs= (popup_menu_function *)NULL,
void **func_data = (void **) NULL,
char *enabled_entries = (char *) NULL,
HELP_CALLBACK_DATA *help_data = (HELP_CALLBACK_DATA *) NULL);
/* create a pop up menu */
void xpndtv(unsigned char *cbuf, XCHAR *xbuf, short *maxlen,
short *status); /* expand a compressed TV image */
void xserver_name(char *); /* get xserver name */
void pausex(void);
void unflsh(void);
int get_beam_switch_off(int sw, int s_switches[], int *s_ct, int h_switches[], int *h_ct);
int set_beam_switch(int sw, int state);
#ifdef __cplusplus
}
void setSignalCb(int signum, sighandler_t handler);
#endif
/******************************************************************************/
/*
** equivalent name definitions
*/
/******************************************************************************/
#define ACCTIM acctim
#define ACNET_COPY_WINDOW_C acnet_copy_window_c
#define ACNET_ERROR_CATEGORY acnet_error_category
#define ACNET_ERROR_CODE acnet_error_code
#define ACNET_ERROR_DESCRIPTION_C acnet_error_description_c
#define ACNET_ERROR_TEXT acnet_error_text
#define ACNET_TASK_EXISTS_C acnet_task_exists_c
#define ACNET_TASK_ID_TO_NAME_C acnet_task_id_to_name_c
#define ACNET_TASK_INFO_C acnet_task_info_c
#define ACNET_TASK_PID_TO_NAME_C acnet_task_pid_to_name_c
#define ADD_DELIMITED_FILE_HEADER_C add_delimited_file_header_c
#define ALARM_CANCEL_MESSAGE_C alarm_cancel_message_c
#define ALARM_REPORT alarm_report
#define ALARM_RPTW_TEXT alarm_rptw_text
#define ALARM_SEND_MESSAGE_C alarm_send_message_c
#define ALARM_SUBMIT_EVENT alarm_submit_event
#define APP_DEBUG_MODE app_debug_mode
#define APP_EXECUTABLE_EXISTS app_executable_exists
#define APPLICATION_AUTHOR_C application_author_c
#define APPLICATION_DESCRIPTION_C application_description_c
#define ARGPTR argptr
#define LOCAL_ASCTIME_TO_CLINKS local_asctime_to_clinks
#define BIT_COUNT_C bit_count_c
#define CAMAC_BTR_TEST_DATA_C camac_btr_test_data_c
#define CAMAC_COMPONENT_NODES_C camac_component_nodes_c
#define CAMAC_CRATE_LIST_C camac_crate_list_c
#define CAMAC_CRATE_STATUS_LIST_C camac_crate_status_list_c
#define CAMAC_CRATE_TO_NODE_C camac_crate_to_node_c
#define CAMAC_FIRST_SLOT_LIST_C camac_first_slot_list_c
#define CAMAC_MADC_LIST_C camac_madc_list_c
#define CAMAC_MADC_TO_NODE_C camac_madc_to_node_c
#define CAMAC_NODE_LIST_C camac_node_list_c
#define CENTRAL_SERVICE_INFO central_service_info
#define CHGPGM chgpgm
#define CHGPGM_C chgpgm_c
#define CKCVD ckcvd
#define CKCVE ckcve
#define CKCVG ckcvg
#define CKCVG8 ckcvg8
#define CKCVH ckcvh
#define CKCVI ckcvi
#define CKCVN ckcvn
#define CKCVO ckcvo
#define CKNOB cknob
#define CKTRMU cktrmu
#define CLASS_ALARMS_CDF class_alarms_cdf
#define CLASS_ANY_REDIRECT class_any_redirect
#define CLASS_CHECK_UTISETS class_check_utisets
#define CLASS_DO_CHECK class_do_check
#define CLASS_GET class_get
#define CLASS_GET_NAMES class_get_names
#define CLASS_GET_SETS class_get_sets
#define CLIB_ENVIRONMENT clib_environment
#define CLIB_FOPEN clib_fopen
#define CLIB_OPEN clib_open
#define CLIB_TYPE clib_type
#define CLIBSHR_DATE clibshr_date
#define CLIBSHR_TAG clibshr_tag
#define CLINKS_LOCALTIME clinks_localtime
#define CLINKS_NOW clinks_now
#define CLINKS_TO_LOCAL_CTIME_C clinks_to_local_ctime_c
#define CLINKS_TO_DATE clinks_to_date
#define CLINKS_TO_DATIME_C clinks_to_datime_c
#define CLINKS_TO_DAY_OF_WEEK_C clinks_to_day_of_week_c
#define CLINKS_TO_JULIAN_DATE_C clinks_to_julian_date_c
#define CLINKS_TO_SPECIAL_TIME_C clinks_to_special_time_c
#define CLINKS_TO_YEAR_C clinks_to_year_c
#define CLREF clref
#define CMU_CONNECT cmu_connect
#define CMU_DISCONNECT cmu_disconnect
#define CMU_EMPTY_BOX cmu_empty_box
#define CMU_RECEIVE cmu_receive
#define CMU_SEND cmu_send
#define CNS_BEEP cns_beep
#define CNS_RAISE_UTIL cns_raise_util
#define COMMON_TRANSFORM_NUM_CONST_C common_transform_num_const_c
#define CONVERT_COMPARE_DATE_TO_CLINKS convert_compare_date_to_clinks
#define CONSOLE_SLOT_PROGRAM_STATE_C console_slot_program_state_c
#define CONSOLE_TASK_NAME_C console_task_name_c
#define CONSOLE_USER_NAME_TO_FULL_NAME console_user_name_to_full_name
#define CONSOLE_WINDOW_GIVE_FOCUS_C console_window_give_focus_c
#define CONSOLE_WINDOW_HAS_FOCUS_C console_window_has_focus_c
#define CONVERT_SECONDS_C convert_seconds_c
/* #define COPIES copies */
#define COPIES_C copies_c
#define CPRSTV cprstv
#define LOCAL_CTIME_TO_CLINKS_C local_ctime_to_clinks_c
#define CTNAME ctname
#define CURRENT_CLIB_INSTALLED current_clib_installed
#define CURRENT_TIME_IN_CLINKS current_time_in_clinks
#define CURRENT_TIME_UTC current_time_utc
#define CVDEC cvdec
#define CVDI4 cvdi4
#define CVDI8 cvdi8
#define CVE cve
#define CVG cvg
#define CVG8 cvg8
#define CVH cvh
#define CVHI4 cvhi4
#define CVHI8 cvhi8
#define CVI cvi
#define CVI4D cvi4d
#define CVI4H cvi4h
#define CVI4N cvi4n
#define CVI4O cvi4o
#define CVI8D cvi8d
#define CVI8H cvi8h
#define CVI8N cvi8n
#define CVI8O cvi8o
#define CVN cvn
#define CVO cvo
#define DATE_TO_CLINKS date_to_clinks
#define DATIME datime
#define DATIME_TO_CLINKS datime_to_clinks
#define DAWEEK daweek
#define DBAREQ dbareq
#define DBGET dbget
#define DBGETI dbgeti
#define DBM_READ dbm_read
#define DBPROC dbproc
#define DBRDI dbrdi
#define DBREQ dbreq
#define DBRMC dbrmc
#define DBRPDB dbrpdb
#define DBSIZE dbsize
#define DBWAIN dbwain
#define DB_CLOSE db_close
#define DB_DISCONNECT db_disconnect
#define DB_INSERT db_insert
#define DB_DATE_TO_CLINKS db_date_to_clinks
#define DB_DATE_TO_DATE_C db_date_to_date_c
#define DB_ERROR db_error
#define DB_FREE_RESULT_SET_INFO db_free_result_set_info
#define DB_GET_RESULT_SET_INFO db_get_result_set_info
#define DB_MODIFY db_modify
#define DB_NEXTROW db_nextrow
#define DB_OPEN db_open
#define DB_SELECT db_select
#define DB_SEND_C db_send_c
#define DB_SET_ACCOUNT db_set_account
#define DB_SET_PASSWORD db_set_password
#define DB_TIMEOUT_FROM_DIO db_timeout_from_dio
#define DB_USERS db_users
#define DEC_TO_IEEE_FLOAT_C dec_to_ieee_float_c
#define DELTA_SECONDS delta_seconds
#define DELTA_TIME delta_time
#define DELTA_TIME_ALLOCATE delta_time_allocate
#define DELTA_TIME_FREE delta_time_free
#define DELTA_TIME_HISTORY delta_time_history
#define DELTA_TIME_PRIVATE delta_time_private
#define DELTA_TIME_HISTORY_PRIVATE delta_time_history_private
#define DEVICE_HELP_URL device_help_url
#define DIO_CLEAR_REDIRECTION_SLOT dio_clear_redirection_slot
#define DIO_LOG_ERROR dio_log_error
#define DIO_ENABLE_ERROR_LOGGING dio_enable_error_logging
#define DIO_SET_REDIRECTION_SLOT dio_set_redirection_slot
#define DISPLAY_URL display_url
#define DI2NAM di2nam
#define DKNOB dknob
#define DNCASE dncase
#define DNCASE_C dncase_c
#define DPCANQ dpcanq
#define DPDCRL dpdcrl
#define DPFTD dpftd
#define DPGET dpget
#define DPIEEE dpieee
#define DPM_VERIFY_FREE_SPACE dpm_verify_free_space
#define DPPROC dpproc
#define DPRALL dprall
#define DPREM dprem
#define DPREQ dpreq
#define DPSET dpset
#define DPSRPY dpsrpy
#define DP_GET_FTD dp_get_ftd
#define DSTATX dstatx
#define ENV_IS_ACNET_IN_A_BOX env_is_acnet_in_a_box
#define ERRHLP errhlp
#define ERRHLP_C errhlp_c
#define EVENT_CALLBACK_INIT_C event_callback_init_c
#define EVENT_CALLBACK_TERM_C event_callback_term_c
#define EVENT_COUNT_C event_count_c
#define EVENT_HISTORY event_history
#define EVENT_LAST_TIMESTAMP_C event_last_timestamp_c
#define EVENT_SET_FAKE event_set_fake
#define EVENT_TRANSLATE_C event_translate_c
#define EVMON evmon
#define EVMON0 evmon0
#define EVMON_PLOT_INFO_C evmon_plot_info_c
#define EVMON_USEC_C evmon_usec_c
#define EXTRACT_BIT_FIELD_C extract_bit_field_c
#define FAC_CODE_TO_NAME_C fac_code_to_name_c
#define FAC_NAME_TO_CODE fac_name_to_code
#define FILE_OPEN_DONT_LOG file_open_dont_log
#define FILLI1 filli1
#define FILLI2 filli2
#define FILLI4 filli4
#define FIND_PROGRAM_C find_program_c
#define FNDGEN fndgen
#define FPIEEE fpieee
#define FRAMEP framep
#define FSCLOS fsclos
#define FSDEL fsdel
#define FSHARE_TASK_INFO fshare_task_info
#define FSOPEN fsopen
#define FSRDM fsrdm
#define FSREAD fsread
#define FSREW fsrew
#define FSTPLT fstplt
#define FSUNLK fsunlk
#define FSWADC fswadc
#define FSWAIN fswain
#define FSWEOF fsweof
#define FSWRIT fswrit
#define FS_LOG_WRITE_MESSAGE fs_log_write_message
#define FS_LOG_FILE_WRITES_C fs_log_file_writes_c
#define FTPPLT ftpplt
#define GAS_CRATES_AND_SLOTS_C gas_crates_and_slots_c
#define GAS_HOUSE_CODE_TO_NODE_C gas_house_code_to_node_c
#define GAS_HOUSE_LIST_C gas_house_list_c
#define GAS_HOUSE_TO_NODE_C gas_house_to_node_c
#define GENERIC_MESSAGE_INIT generic_message_init
#define GETCMD getcmd
#define GETCMD_C getcmd_c
#define GETTIM gettim
#define GET_GLOBAL_CAMAC_NODE_C get_global_camac_node_c
#define GET_SETPRIV get_setpriv
#define GO_TO_INDEX_PAGE go_to_index_page
#define GRAPHICS_WINDOW_TO_INDEX_C graphics_window_to_index_c
#define GSADDR gsaddr
#define GSADR1 gsadr1
#define GSADR2 gsadr2
#define GSBOOT gsboot
#define GSCHK gschk
#define GSGET gsget
#define GSGETW gsgetw
#define GSLEND gslend
#define GSLIST gslist
#define GSMOD gsmod
#define GSREAD gsread
#define GSSET gsset
#define GSTANC gstanc
#define HDCOPY hdcopy
#define HLPSUB hlpsub
#define HOUSE_NAME house_name
#define HSCODE hscode
#define HSCODX hscodx
#define IAVDEF iavdef
#define ICSHFT icshft
#define IEEE_TO_DEC_FLOAT_C ieee_to_dec_float_c
#define IERRTV ierrtv
#define IERRTX ierrtx
#define ICSHFT icshft
#define IMSURE imsure
#define IN_CLIBSHR in_clibshr
#define INDEX_PAGE_PA index_page_pa
#define INDEX_PAGE_TITLE_C index_page_title_c
#define INTYPE intype
#define INTYPE_AGAIN intype_again
#define INTYPE_CALLBACK_INIT intype_callback_init
#define INTYPE_CALLBACK_TERM intype_callback_term
#define INTYPE_DISABLE_HOTKEYS intype_disable_hotkey
#define INTYPE_PUT_ROWCOL intype_put_rowcol
/* #define IOMAC iomac */ /* would redefine a macro having the same name */
#define IS_ACNET_ERROR_C is_acnet_error_c
#define IS_CAMAC_NODE_C is_camac_node_c
#define IS_COMPONENT_CAMAC_NODE_C is_component_camac_node_c
#define IS_DAY_OF_WEEK_STRING_C is_day_of_week_string_c
#define IS_EPICURE_NODE_C is_epicure_node_c
#define IS_GENERIC_MESSAGE is_generic_message
#define IS_LINEAR_COMMON_TRANSFORM_C is_linear_common_transform_c
#define IS_LINUX is_linux
#define IS_MONTH_STRING_C is_month_string_c
#define IS_SPLIT_CAMAC_NODE_C is_split_camac_node_c
#define IS_STRING_COMMON_TRANSFORM_C is_string_common_transform_c
#define IS_UNSCALABLE_PRIMARY_TRANSFORM_C is_unscalable_primary_transform_c
#define IS_VALID_APPLICATION_C is_valid_application_c
#define IS_VALID_FERMI_ASCII_CHARACTER_C is_valid_fermi_ascii_character_c
#define IS_VALID_USERNAME is_valid_username
#define ITVATT itvatt
#define JULIAN_DATE_TO_CLINKS_C julian_date_to_clinks_c
#define K15HZ k15hz
#define KERBEROS_GET_PRINCIPAL kerberos_get_principal
#define LABINH labinh
#define LABSEL labsel
#define LALARM lalarm
#define LBYPAS lbypas
#define LCKARG lckarg
#define LCKCLK lckclk
#define LCKCLK_ALLOCATE lckclk_allocate
#define LCKCLK_API lckclk_api
#define LCKCLK_FREE lckclk_free
#define LCKTRM lcktrm
#define LDVON ldvon
#define LDVPOS ldvpos
#define LDVRAMP ldvramp
#define LDVRDY ldvrdy
#define LDVREM ldvrem
#define LENCHS lenchs
#define LENCHS_C lenchs_c
#define LEXVALUES lexvalues
#define LEX_DRAW_DISPLAY_C lex_draw_display_c
#define LEX_DRAW_SIZE_C lex_draw_size_c
#define LEX_OBJECT_DISPLAY_C lex_object_display_c
#define LEX_SA_FIND_ACL_SCRIPTS_C lex_sa_find_acl_scripts_c
#define LEX_SA_FIND_DEVICE_C lex_sa_find_device_c
#define LEX_SA_GET_DEVICES lex_sa_get_devices
#define LEX_SA_GET_INFO_C lex_sa_get_info_c
#define LIB_SLEEP lib_sleep
#define LIB_SLEEP_MILLISECS lib_sleep_millisecs
#define LIB_SLEEP_SECONDS lib_sleep_seconds
#define LITAPC litapc
#define LOG_CAMAC_WRITE_C log_camac_write_c
#define LOGGER_CHECK_ALIVE logger_check_alive
#define LOGGER_DEVICES_FROM_NODE_C logger_devices_from_node_c
#define LOGGER_FIND_DELETED_DEVICE_C logger_find_deleted_device_c
#define LOGGER_FIND_DEVICE_C logger_find_device_c
#define LOGGER_FIND_DEVICE_LIST_ENTRIES_C logger_find_device_list_entries_c
#define LOGGER_FIND_FASTEST_NODE_BY_NAME_C logger_find_fastest_node_by_name_c
#define LOGGER_FREE_MEMORY logger_free_memory
#define LOGGER_GET_ARRAY_DEVICE_C logger_get_array_device_c
#define LOGGER_GET_DEVICE_C logger_get_device_c
#define LOGGER_GET_DEVICE_BY_NAME_C logger_get_device_by_name_c
#define LOGGER_GET_DEVICE_EVENTS_C logger_get_device_events_c
#define LOGGER_GET_DEVICE_INFO_C logger_get_device_info_c
#define LOGGER_GET_DEVICE_LIST_C logger_get_device_list_c
#define LOGGER_GET_EXISTING_LOGGERS logger_get_existing_loggers
#define LOGGER_GET_LOGGED_DEVICES_C logger_get_logged_devices_c
#define LOGGER_IS_ARRAY_RETRIEVAL_NODE_C logger_is_array_retrieval_node_c
#define LOGGER_IS_CLIENT_DATA_RETRIEVAL_NODE_C logger_is_client_data_retrieval_node_c
#define LOGGER_IS_CLIENT_LOGGING_NODE_C logger_is_client_logging_node_c
#define LOGGER_LIST_DAQ_STATS_C logger_list_daq_stats_c
#define LOGGER_LIST_DATA_EVENT_INFO_C logger_list_data_event_info_c
#define LOGGER_LIST_DEVICE_STATS_C logger_list_device_stats_c
#define LOGGER_LIST_INFO_C logger_list_info_c
#define LOGGER_LOG_ARRAY_DEVICE_C logger_log_array_device_c
#define LOGGER_LOG_CONTROL_VALUES_C logger_log_control_values_c
#define LOGGER_LOG_DEVICE_LIST_C logger_log_device_list_c
#define LOGGER_LOG_DEVICES_C logger_log_devices_c
#define LOGGER_NAME_TO_NODE logger_name_to_node
#define LOGGER_READ_ARRAY_DEVICE_C logger_read_array_device_c
#define LOGGER_READ_ARRAY_DEVICE_MULTIPLE_C logger_read_array_device_multiple_c
#define LOGGER_READ_ARRAY_DEVICE_MULTIPLE_BY_NAME_C logger_read_array_device_multiple_by_name_c
#define LOGGER_READ_ARRAY_DEVICE_STATUS_C logger_read_array_device_status_c
#define LOGGER_READ_DEVICE_C logger_read_device_c
#define LOGGER_READ_DEVICE_BY_NAME_C logger_read_device_by_name_c
#define LOGGER_READ_DEVICE_LIST_C logger_read_device_list_c
#define LOGGER_READ_DEVICE_STATUS_LIST_C logger_read_device_status_list_c
#define LOGGER_RESTART_LISTS logger_restart_lists
#define LOGGER_RETURN_DATA logger_return_data
#define LOGGER_RETURN_NAMES logger_return_names
#define LOGGER_SET_REMAINING_MEMORY_LIMIT_C logger_set_remaining_memory_limit_c
#define LOGGER_SETNODE logger_setnode
#define LOGGER_SHUTDOWN logger_shutdown
#define LOGGER_START_PLOT_C logger_start_plot_c
#define LOGGERS_ON_NODE_C loggers_on_node_c
#define LRDAST lrdast
#define LSW lsw
#define LSWOFF lswoff
#define LSWON lswon
#define LXARC lxarc
#define LXBMOV lxbmov
#define LXBORD lxbord
#define LXBRAT lxbrat
#define LXCARC lxcarc
#define LXCATT lxcatt
#define LXCINT lxcint
#define LXCIR lxcir
#define LXCLIM lxclim
#define LXCLIP lxclip
#define LXCMAP lxcmap
#define LXCTYP lxctyp
#define LXCURS lxcurs
#define LXCVEC lxcvec
#define LXELIP lxelip
#define LXERAS lxeras
#define LXFILL lxfill
#define LXFLSH lxflsh
#define LXHDWR lxhdwr
#define LXIMAG lximag
#define LXMODE lxmode
#define LXOBJ lxobj
#define LXPAINT_GIF_IMAGE lxpaint_gif_image
#define LXPAINT_IMAGE_SIZE lxpaint_image_size
#define LXPAINT_PUT_IMAGE lxpaint_put_image
#define LXPARS lxpars
#define LXPATT lxpatt
#define LXPFIL lxpfil
#define LXPIMG lxpimg
#define LXPNT lxpnt
#define LXPNTS lxpnts
#define LXPSIZE lxpsize
#define LXRCMD lxrcmd
#define LXRECT lxrect
#define LXRST lxrst
#define LXSLOT lxslot
#define LXTEXT lxtext
#define LXTITL lxtitl
#define LXVEC lxvec
#define LXVWID lxvwid
#define LXWIN_ICONIFY lxwin_iconify
#define LXWIN_LOWER lxwin_lower
#define LXWIN_RAISE lxwin_raise
#define LXWPOS lxwpos
#define LXWSIZ lxwsiz
#define LX_GET_TITLE lx_get_title
#define LX_LOAD_FONT lx_load_font
#define LX_QUERY_FONT lx_query_font
#define LX2SS lx2ss
#define MAIL_FILE_C mail_file_c
#define MAIL_SEND mail_send
#define MAIL_SEND_MESSAGE mail_send_message
#define MAKE_COLUMNAR_FILE_C make_columnar_file_c
#define MAKE_DELIMITED_FILE_C make_delimited_file_c
#define MAKE_DELIMITED_FILE_EXT_C make_delimited_file_ext_c
#define MAXTOL maxtol
#define MDAT_FRAME_INFO_C mdat_frame_info_c
#define MILLISECONDS_NOW milliseconds_now
#define MINNOM minnom
#define MOVBIN movbin
#define MOVEBY moveby
#define MOVEWD movewd
#define MOVEX movex
#define MOVEX_C movex_c
#define MRKCAN mrkcan
#define MRKTMR mrktmr
#define MYCONSOLE myconsole
#define MYCONSOLE_SET_C myconsole_set_c
#define MYINSTANCE myinstance
#define MYNAME myname
#define MYNAME_SET myname_set
#define MY_ASCII_NAME my_ascii_name
#define MY_CURRENT_USER_EMAIL my_current_user_email
#define MY_CURRENT_USER_NAME my_current_user_name
#define MY_EXECUTABLE_NAME_C my_executable_name_c
#define MY_FULL_PROCESS_NAME my_full_process_name
#define MY_GEN_NAME my_gen_name
#define MY_GENERIC_ASCII_NAME my_generic_ascii_name
#define MY_HOST_NAME_C my_host_name_c
#define MY_PROGRAM_NAME_C my_program_name_c
#define MY_SYSTEM_INFO_C my_system_info_c
#define MY_USER_NAME my_user_name
#define MYCONSOLE myconsole
#define MYCONSOLE_SET_C myconsole_set_c
#define MYINSTANCE myinstance
#define MYNAME myname
#define MYNAME_SET myname_set
#define MYNODE mynode
#define MYPAGE mypage
#define MYSLOT myslot
#define MYSLOT_INDEX myslot_index
#define MYSLOT_LETTER myslot_letter
#define MYSLOT_SET_C myslot_set_c
#define NAMNOD namnod
#define NAMNOD_C namnod_c
#define NAM2DI nam2di
#define NARG narg
#define NODNAM nodnam
#define NODNAM_C nodnam_c
#define NONCONSOLE_PROGRAM_INIT nonconsole_program_init
#define NUMCNS numcns
#define OTHERS others
#define PAUSE pause
#define PAUSE_C pause_c
#define PAUSEN pausen
#define PA_TO_INDEX_PAGE_C pa_to_index_page_c
#define PDB_SCALING_TABLE_LIMITS_C pdb_scaling_table_limits_c
#define PDB_VALID_LENGTH_C pdb_valid_length_c
#define PDCUPU pdcupu
#define PDCUPU_EXT pdcupu_ext
#define PDCUPU8 pdcupu8
#define PDCUUD pdcuud
#define PDCUUD_EXT pdcuud_ext
#define PDCUUD8 pdcuud8
#define PDIMAX pdimax
#define PDPUCU pdpucu
#define PDPUCU_EXT pdpucu_ext
#define PDPUUD pdpuud
#define PDPUUD_EXT pdpuud_ext
#define PDPUUD8 pdpuud8
#define PDUDCU pdudcu
#define PDUDCU_EXT pdudcu_ext
#define PDUDPU pdudpu
#define PDUDPU_EXT pdudpu_ext
#define PDULEN pdulen
#define PD_DPYFMT pd_dpyfmt
#define PROGRAM_IS_PA program_is_pa
#define PROGRAM_IS_SA program_is_sa
#define R50ASC r50asc
#define RAD50 rad50
#define RDCURS rdcurs
#define RDSPE rdspe
#define RDSPI rdspi
#define RDSPI_C rdspi_c
#define RDSPI4 rdspi4
#define RDSPR rdspr
#define RDSPR_C rdspr_c
#define RDSPR8 rdspr8
#define READ_OAC_CONFIG_INFO_C read_oac_config_info_c
#define READEF readef
#define RECEIV receiv
#define REFLECTED_EVENTS_C reflected_events_c
#define REMOTE_PROGRAM_AVAILABLE_METHODS remote_program_available_methods
#define REMOTE_PROGRAM_BUILD_METHOD_C remote_program_build_method_c
#define REMOTE_PROGRAM_BUILD_SCRIPT_C remote_program_build_script_c
#define REMOTE_PGM_BUILD_SCRIPT_LIST_C remote_pgm_build_script_list_c
#define REMOTE_PROGRAM_CALLER_DATA remote_program_caller_data
#define REMOTE_PROGRAM_CHECK remote_program_check
#define REMOTE_PROGRAM_END_REQUEST_C remote_program_end_request_c
#define REMOTE_PROGRAM_GENERATE_OUTPUT remote_program_generate_output
#define REMOTE_PROGRAM_GET_DATA remote_program_get_data
#define REMOTE_PROGRAM_GET_METHOD remote_program_get_method
#define REMOTE_PROGRAM_GET_SCRIPT remote_program_get_script
#define RERASE rerase
#define RSTBIT rstbit
#define RSTBIT_C rstbit_c
#define RUNNING_CURRENT_CLIB running_current_clib
#define RUNNING_TEST_CLIB running_test_clib
#define RUN_REMOTE_PROGRAM_C run_remote_program_c
#define SELECT_NODE_MENU select_node_menu
#define SEND send
#define SEND_MAIL_TO_PROGRAM_KEEPER send_mail_to_program_keeper
#define SET_BIT_FIELD_C set_bit_field_c
#define SET_RIGHTS_RESOURCE set_rights_resource
#define SET4RD set4rd
#define SETBIT setbit
#define SETBIT_C setbit_c
#define SETEF setef
#define SETTINGS_CALLBACK_INIT_C settings_callback_init_c
#define SETTINGS_CALLBACK_TERM_C settings_callback_term_c
#define SLASH_DATE_TO_CLINKS slash_date_to_clinks
#define SLEEP_MILLISECS_C sleep_millisecs_c
#define SLEEP_SECONDS_C sleep_seconds_c
#define SNPPLT snpplt
#define SNP_SET_SDA_INFO_C snp_set_sda_info_c
#define SRCNCT srcnct
#define SRDCNT srdcnt
#define SRDERR srderr
#define SRDIR srdir
#define SRDISK srdisk
#define SRGET srget
#define SRGETI srgeti
#define SRMOD srmod
#define SRPROC srproc
#define SRREQ srreq
#define SRSETP srsetp
#define SRSIZE srsize
#define SRSNAPREQ srsnapreq
#define SRSTON srston
#define SRWAIN srwain
#define STATES_CALLBACK_INIT states_callback_init
#define STRING_ADDR string_addr
#define SUBMIT_BATCH_JOB submit_batch_job
/* note that clib_swab has different calling sequence than unix swab */
/* here we save anyone who used uppercase SWAB from using the unix swab */
#define SWAB clib_swab
#define CLIB_SWAB clib_swab
#define SWAP_BYTES_C swap_bytes_c
#define SWAP_BYTES_LONGWORD_C swap_bytes_longword_c
#define SWAP_LONGWORDS_C swap_longwords_c
#define SWAP_WORDS_C swap_words_c
#define SWCLR swclr
#define SWCOLR swcolr
#define SWDEF swdef
#define SWGET swget
#define SWMUEX swmuex
#define SWRECT swrect
#define SWSFMT swsfmt
#define SWTEXT swtext
#define SWTVM swtvm
#define SWTVMX swtvmx
#define TERM term
#define TICKS_SINCE_EVENT ticks_since_event
#define TRADITIONAL_DATE_TO_CLINKS traditional_date_to_clinks
#define TSTBIT tstbit
#define TSTBIT_C tstbit_c
#define TVMAP tvmap
//kc in tv.h #define TVUNMAP tvunmap
/* #define TVWPOS tvwpos */
#define TV_WINDOW_TO_INDEX_C tv_window_to_index_c
#define UNMOVEX unmovex
#define UPCASE upcase
#define UPCASE_C upcase_c
#define USER_DEFAULT_DIRECTORY user_default_directory
#define USER_EMAIL_C user_email_c
#define USER_FSHARE_LOCK user_fshare_lock
#define USER_FSHARE_LOCK_READ user_fshare_lock_read
#define USER_FSHARE_UNLOCK user_fshare_unlock
#define USER_PREF_KEY user_pref_key
#define USER_SETS_LOCK user_sets_lock
#define USER_SETS_LOCK_READ user_sets_lock_read
#define USER_SETS_UNLOCK user_sets_unlock
#define VIABRT viabrt
#define VISTRT vistrt
#define VTABRT vtabrt
#define VTCNCL vtcncl
#define VTSTRT vtstrt
#define WAITFR waitfr
#define WAITKB waitkb
#define WHK_CALLBACK_INIT whk_callback_init
#define WHO_STARTED_ME who_started_me
#define WMENU wmenu
#define WMENU_C wmenu_c
#define XPNDTV xpndtv
#define XSERVER_NAME xserver_name
#define GET_BEAM_SWITCH_OFF get_beam_switch_off
#define SET_BEAM_SWITCH set_beam_switch
#endif