An OSDI can be accessed using the C functions in the standard DP4 C library. The interface is functionally similar to QA Build. A small example program is supplied showing how the calls may be used to access the DP4 Till.
Where a POD is passed as a function parameter, you must pass the logical device number as allocated to you by the system (in DFSETUP). For convenience, you can use a #define with an equivalent POD name to that chosen in DFSETUP. You can achieve this conveniently by generating a header file from DFSETUP containing the device numbers defined as POD names, and include this file in your C source. To generate a device header file:
You will be prompted for a header file name. Here is an extract from an example device header file for the DP4 Till. Note that the device numbers here may differ from your definitions if you have set up a DP4 Till. DP4 uses sequential numbering for devices, and yours may differ, depending on existing device definitions on your system database. You can get control over the numbers assigned to PODS (and Device Groups) by running DFSETUP with the -number command tail.
#define SLIP_PRINTER 10082 /* Slip printer */ #define JOURNAL_PRINTER 10083 /* Journal printer*/ #define TILL_ID 10084 /* Till ID */ #define TILL_DRAWER 10085 /* Till drawer */ #define TILL_INIT 10086 /* Example till for OSDI doc */ |