Device server clients access devices using the application programmer's interface (API). For performance reasons the device server API is based on the file paradigm. The file paradigm is the open-read-write-close paradigm. The device server API paradigm uses the import-put-get-free paradigm.
The three fundamental API calls are --
dev_import (name,ds_handle,access,error) char *name; devserver *ds_handle; long access; long *error;
dev_putget (ds_handle,cmd,argin_ptr,in_type,argout_ptr,out_type,error) devserver ds_handle; short cmd; DevArgument *argin_ptr; DevType in_type; DevArgument *argout_ptr; DevType out_type; long *error;
dev_free (ds_handle,error) devserver ds_handle; long *error;
Using these three calls clients can execute all commands implemented in the device class on an imported device. All calls are synchronous calls. This means that the clients waits for the call to complete before continuing. If the device server does not respond or the remote machine is down a timeout will occur. If the client continues to try executing dev_putget() calls and in the meantime the device server is running again the device will be automatically reimported. This last feature assumes that the device has been imported correctly before the connection was lost.