Initialization#

Handel uses four global structures to manage a DAQ system: Detector, Firmware, Acquisition Values and Module information. The system is configured by calling xiaInit() and passing the name of a preconfigured .ini file. XIA software applications such as ProSpect save configurations for use in this manner. See [INI Files] for the file format specification.

int xiaExit(void)#

Disconnects from the hardware and cleans up Handel’s internal data structures.

Returns:

A status code indicating the result of the operation.

Return values:
  • XIA_SUCCESS – Successful execution.

  • Non-zero integer – If there was an error, check the log for more details.

Example Usage

int status;
status = xiaExit();
if (status != XIA_SUCCESS) {
    /* ERROR cleaning up Handel */
}
void xiaGetVersionInfo(int *rel, int *min, int *maj, char *pretty)#

Returns Handel’s version in numeric and/or string format. If all three integer values are passed as non-null pointers, the three components will be set and can be reassembled using the Semantic Version 2.0.0 specification.

Param[out] rel:

Pointer to an integer representing the software’s patch version.

Param[out] min:

Pointer to an integer representing the software’s minor version.

Param[out] maj:

Pointer to an integer representing the software’s major version.

Param[out] pretty:

Pointer to a character array that gets filled with the preformatted version. Used for writing to a log or display, including the numeric components and a tag indicating special build information (a release source version hash or “development”). _The expected string length is not currently defined._

int xiaInit(char *iniFile)#

Initializes the Handel library and loads in an .ini file. The functionality of this routine can be emulated by calling xiaInitHandel() followed by xiaLoadSystem(). Either this routine or xiaInitHandel() must be called prior to using the other Handel routines.

param[in] iniFile:

Name of the configuration file to be loaded. This name may be an absolute or relative path and is located according to the conventions in [Calling Conventions].

returns:

A status code indicating the result of the operation.

retval XIA_NOMEM:

Internal Handel error. Contact XIA.

retval XIA_OPEN_FILE:

Unable to open specified .ini file.

retval XIA_SUCCESS:

Successful execution.

Example Usage

int status;
status = xiaInit("myFile.ini");
if (status != XIA_SUCCESS) {
    /* ERROR initializing library or loading .ini file */
}
int xiaInitHandel(void)#

Initializes the library. Either this routine or xiaInit() must be called before any other Handel routines are used.

Returns:

A status code indicating the result of the operation.

Return values:
  • XIA_NOMEM – Internal Handel error. Contact XIA.

  • XIA_SUCCESS – Successful execution.

Example Usage

int status;
status = xiaInitHandel();
if (status != XIA_SUCCESS) {
    /* ERROR initializing Handel */
}