Download Processing - A-Tech Instruments Ltd.
Transcript
SYSTEM SOFTWARE 3 3.c USER’S C-LANGUAGE APPLICATION PROGRAM(S) A custom C-language application program for accessing and making use of SPS8000-acquired data can be written by the user, by the Daytronic Systems Integration Department, or by some other integrator. Such a program links to DGI database resources via the DGI-resident Application Program Interface (API). An application program would use one of two basic methods for getting data from the DGI board: • Buffer Method A buffer is provided to the called routine. Data is placed in that buffer, which must be of the correct type and size. This method is useful in nonassembly language programs where data cannot be accessed from memory external to the program. Whenever a fresh data set is required, a call to the API data mover resource causes the DGI’s most current data buffer to be transferred to the application program’s memory. • Direct Access Method The calling program is provided with a structure of pointers, which are passed to it by the API driver. It is then up to the calling program to interpret the pointers and the data. Since the addresses of the current buffers are dynamic, the application program must request fresh pointers once per application program scan. This method allows an application program to access data quickly and directly from the DGI’s dual-port memory. It is useful in assembly language programs that can access memory residing in an external segment. 3.c USER’S C-LANGUAGE APPLICATION PROGRAM(S) 33