Procedure 23

Allocate Device

client identifier

capability

 

device name length

 

device name

 

REQUEST

Allocates the specified device for exclusive use of the client to the supplied client identifier.

Client identifier is a 4 byte opaque field supplied by the client to identify this device. It must be different from any other Client identifier currently in use by this client for previously allocated devices.
Capability is the access key provided by the server for use by the client.(See procedure 24 - Claim EGTS.)
device name specifies the server resource to be allocated. It may be either be the name of an actual resource or a generic name given to a group of identical resources. The resources available are server dependent but a list may be obtained by use of the Inquire Available Devices procedure.

success = 0

device name length

 

device name

 

RESPONSE - success

The response returns the actual device allocated. This is useful when the request supplies a generic name requesting any one of a group of identical devices.
The current value of stream status for this stream changes to dev_alloc.
The current value of procedure status for this stream changes to success.

procedure status

RESPONSE - failure

procedure status which is non zero indicates the cause of the failure.

1

client identifier already in use for this client

3

no free resources

6

requested resource unavailable/P>

8

invalid capability

procedure status

Implementation

This procedure is used to claim a resource currently in the free device list and allocate it to the current experiment. The device can be allocated by supplying either the real name of a device or a generic name. If a generic name is supplied the server will select any free device. The procedure response returns the allocated real device name which is useful if the request supplied a generic name. For the special devices SINK and FILE the real device name returned is always SINK or FILE.
The client supplies a 32 bit identifier which the server associates with the allocated device. All subsequent requests from the client for this device will supply the identifier which the server will use as a reference for the device. The client identifier can have any form but the Eurogam control software uses the names TAP0, TAP1 etc.
The server logs the result of the procedure into the System Log recording the client identifier and real device name allocated.