Microsoft LPF-00004 Manuale dell'Operatore Pagina 125

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 124
PROGRAMMER'S GUIDE Page 107
C
YBER
A
MP
380, COPYRIGHT MARCH 2002, AXON INSTRUMENTS, INC.
The following description of the library interface uses a non-language-specific calling convention that
describes the calling interface to the support routines. All procedure arguments are passed by value in
C (unless otherwise noted) and by reference in BASIC. This convention uses the following types for
procedure arguments and return values:
Convention C type BASIC type
integer int integer%
float float single or single!
string char [ ] string$
ref integer int * N/A
ref float float * N/A
ref string char * N/A
The procedure naming convention is also non-specific to any language. The following naming
convention and the corresponding language specific names are used:
Naming Convention C Name BASIC Name
int Initialize ( ) int C300_Initialize (void) function C300.Initialize% ( )
define COM1 #define C300_COM1 const C300.COM1
Note that names that are fully capitalized represent constants that are defined in the header and
include files.
Implementation Notes
All procedures that are available in the library return an integer value which is zero (defined by the
constant SUCCESS in the header file or include file for the corresponding language) if the call was
successful or non-zero if unsuccessful, (error return codes are also defined in the header/include files).
This return value can be used in an IF statement to perform any necessary error action. The most
recently generated return value is always available by calling the routine GetLastError.
Most of the procedures that send simple commands to the CyberAmp do not send the commands
directly to the unit, but buffer them until either a call is made to the FlushCommands routine or until
a command is to be sent that would require a response. The routine FlushCommands will do nothing
if there are no buffered commands to be sent. Therefore, a call to FlushCommands should be coded
in the program prior to exiting. Library procedures that buffer the generated CyberAmp commands
are indicated by the <buffered> annotation in their definition.
Support Routine Details
Please note that wherever the variable Channel is used, valid channel numbers are in the range 1 to 2
for the CyberAmp 320 and 1 to 8 for the CyberAmp 380.
A detailed description of all the support routines in the library now follows.
1) integer Initialize ( )
This procedure must be called before any other calls to the CyberAmp support library. It always
returns a successful result after performing some internal initialization and setup.
Vedere la pagina 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 156 157

Commenti su questo manuale

Nessun commento