Common use of Initialization Clause in Contracts

Initialization. During initialization, port drivers register each communication port as well as all supported interfaces. User code creates an asynUser, which is a "handle" for accessing asynDriver facilities, by calling pasynManager->createAsynUser(processCallback,timeoutCallback); An asynUser has the following features: • An asynUser is the means by which asynManager manages multiple requests for accessing a port. • processCallback,which is used by queueRequest described below, is the addresss of a user supplied callback routine. • timeoutCallback is the address of caller supplied callback that will be called if a queueRequest remains on the queue too long. • Device support code should create an asynUser for each "atomic" access to low level drivers, i.e. a set of calls that must not be interlaced with other calls to the low level drivers. For example device support for EPICS record support should create an asynUser for each record instance. • Device support code should NOT try to share an asynUser between multiple sources of requests for access to a port. If this is done then device support must itself handle contention issues that are already handled by asynManager. User code connects to a low level driver via a call to status = pasynManager->connectDevice(pasynUser,portName,addr); This call must specify the name of the port and the address of the device. It then calls findInterface to locate the interfaces with which it calls the driver. For example: pasynInterface = pasynManager->findInterface(pasynUser,asynOctetType,1);

Appears in 7 contracts

Samples: epics-modules.github.io, epics-modules.github.io, epics-modules.github.io

AutoNDA by SimpleDocs

Initialization. During initialization, port drivers register each communication port as well as all supported interfaces. 14 portThread User code creates an asynUser, which is a "handle" for accessing asynDriver facilities, by calling pasynManager->createAsynUser(processCallback,timeoutCallback); An asynUser has the following features: • An asynUser is the means by which asynManager manages multiple requests for accessing a port. • processCallback,which is used by queueRequest described below, is the addresss of a user supplied callback routine. • timeoutCallback is the address of caller supplied callback that will be called if a queueRequest remains on the queue too long. • Device support code should create an asynUser for each "atomic" access to low level drivers, i.e. a set of calls that must not be interlaced with other calls to the low level drivers. For example device support for EPICS record support should create an asynUser for each record instance. • Device support code should NOT try to share an asynUser between multiple sources of requests for access to a port. If this is done then device support must itself handle contention issues that are already handled by asynManager. User code connects to a low level driver via a call to status = pasynManager->connectDevice(pasynUser,portName,addr); This call must specify the name of the port and the address of the device. It then calls findInterface to locate the interfaces with which it calls the driver. For example: pasynInterface = pasynManager->findInterface(pasynUser,asynOctetType,1);

Appears in 2 contracts

Samples: epics.anl.gov, epics-modules.github.io

AutoNDA by SimpleDocs
Time is Money Join Law Insider Premium to draft better contracts faster.