University of Illinois at Urbana-Champaign

emcOpen

NAME

emcOpen()- Initialize electron microscope communications

SYNOPSIS

#include "emc.h"
int emcOpen(EM **em, char *device);

DESCRIPTION

emcOpen() sets up and initializes communication with the Electron Microscope described by device. An EM control and communications structure is created and pointer to this structure is returned in em. This pointer is used by the remaining functions in the library to specify which Electron Microscope the function should act on. The EM structure itself is opaque and can not be accessed.

**em
is a pointer to memory location that can contain a pointer. A pointer to a EM control and communications data structure is stored in this memory location. This pointer can then be passed to the remaining EMC functions to indicate which instrument the function should act upon.
*device
is a pointer to a NULL terminated array of characters (string) which indicate the device name of the Electron Microscope to communicate with. The valid contents of this string are defined by the implementation of the EMC library. Some examples are:
/dev/tty0 EM is connected through this device file
machine.name.domain:1701 EM is connected through an instrument control server specified using communications port 1701

RESTRICTIONS

The caller is responsible for calling emcClose() to release any resources that may have been allocated by emcOpen() and for terminating the connection with the Electron Microscope.

DIAGNOSTICS

EMC_OK (0) Success
EMC_ERROR (-1) Error

PREVIOUS Page 42 of 54 NEXT