Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


 
Returns the coresponding client Id of a given client Name.
All clients that connect to an EDM Server will have assigned a unique numeric client Id. Defining a client name, however, is optional. Therefore this function may only be used to retrieve the client Ids of clients that are connected with the EDM Server with a defined client name.
 
Related functions: edmiGetClientNames, edmiDefineClientName
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetClientId(SdaiString   clientName,
                           SdaiClientId *clientId, 
                           SdaiString   *hostName);
Arguments:

ClientName

The defined client name of the connected client. Use edmiDefineClientName to define client names.

*clientId

Address of a variable that will receive the unique numeric id that identifies the connected client.

*hostName

Address of a string pointer that will receive the host name at which the client process is running.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiString myHostName;
SdaiClientId myClientId;
SdaiString myClientName = "My Client Name";
. . .
edmiDefineClientName(myClientName);
if (rstat = edmiGetClientId(myClientName, &myClientId, &myHostName)) {
printf("\nError %d in edmiGetClientId: %s", rstat,  
edmiGetErrorText(rstat)); 
goto error; 
}

  • No labels