Returns info about my clients connection to an EDM Server.
When connecting to an EDM Server, all clients will be assigned unique numeric client Ids. Optionally, all clients may also define a client name for them selves. This will simplify the identification of my client process on the EDM Server when all clients are listed by edmiWhoIsOn.
Related functions: edmiWhoIsOn, edmiDefineClientName, edmiGetClientId, edmiGetClientNames, edmiResetClient.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetMyClientId(SdaiClientId *myClientId,
SdaiString *myHostName,
SdaiString *myClientName);
Arguments:
*myClientId |
Address of a variable that will receive the client Id of my current connection with the EDM Server. |
*myHostName |
Address of a string pointer that will receive the name of the host at which my client process is running. |
*myClientName |
Address of a string pointer that will receive the optionally defined name of my clients current connection with the EDM Server. |
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;
SdaiClientId myClientId;
SdaiString myHostName;
SdaiString myClientName;
. . .
if (rstat = edmiGetMyClientId(&myClientId,&myHostName,&myClientName)) {
printf("\nError %d in edmiGetMyClientId: %s", rstat,
edmiGetErrorText(rstat));
goto error;
}
printf("\nMy Unique Client Id is: %d", myClientId);
printf("\nI'm currently located at %s", myHostName);
if (strlen(myClientName)) {
printf("\nMy client name is %s", myClientName);
}