svtvme API Draft

In this I do not distinguish between int and enum types.

General rules.

  1. Global names: all global variable and function names must start with the SVTVME string, Upper/lower case does not matter but uniqueness to the package is required for VxWorks. See: http://www-b0.fnal.gov:8000/computing/vxworks/symbol_table.html
  2. parameter passing. Use the same syntax for read and write, so for functions that access single words, the variable with the value is always passed as pointers, not by value. I.e. funct(..., int * value) bot if you write value or if you read value.
  3. special values. There is no special menaing associated to "strange" values of parameters. If a request is made to read 0 words, nothing happens. Specific functinos are defined for reading entire memories or fifos.
  4. return values: the funcions always returns an information. Negative values are reserved for errors. 0 and positive means success. Logical functions (svtvme_isXXX) return 1 if true, 0 if false.
  5. Encapsulation: the user code will access everything via functions, will never deal with any internal strucutre. The only variables that the user code has to know are the svtvme_t strucutre that the user creates for each physical boars, the list of object Id's for each board type, and the Id's of each baord type (same as board ID in the prom).

Global variables/functions:

Global variables will be used to set the verbosity level for all svtvme calls in a program. They can be set/queried via specific functions. No direct access to those variables from the user code.

Board handle creation/tuning:

Single board access:

all the following functions have the same mechanism for returning the completion status: 0 : success !=0: error the return value is just a status code. If the functions requests the transfer of an unknown numebr of words, the actual number of transfers has to be returned as an arguement, as fision does.