User functions

User functions are one or more functions that you provide written in C or C++. They are linked to, and called by, the main() function. They can establish the necessary links to host computers, provide the application logic to access the required data, or perform other general processes. User functions are not mandatory if you code the main() function yourself.

A state table interacts with a custom server by invoking user functions, and passing them parameters. The user functions perform the requested processes and pass information back to the calling voice application state table. Refer to User function parameters for rules governing valid user function input and output parameters.

A single main() function generally calls several user functions. You can code user functions on the Power System, or copy them to the Power System using the custom server import facility (see Importing files into the custom server directory). User functions can use custom server subroutines.

Four special user functions can be defined on the Custom Server window, see Figure 1. These special user functions are: