edmiWhoIsOn
EdmiError edmiWhoIsOn(SdaiInteger *numberOfConnections,
tEdmiWhoIsOn **pWhoIsOn);
Returns the number of connected clients to the actual EDMserver as well as an information record for each of the active users. The tEdmiWhoIsOn struct is defined as
typedef struct{
long taskNo,
SdaiInstance userId,
EdmiPackedDate lastConnected,
long currentUser,
char userName[MaxUserName],
char groupName[MaxGroupName],
char opsysUserName[MaxUserName],
char hostName[MaxHostName]
} EdmiWhoIsOn;
Type | Name | Comment |
long | taskNo | EDMserver process number. |
SdaiInstance | userId | A numeric userID that uniquely identifies the edm_user instance in the EDMdatabase that defined the actual EDMuser. |
EdmiPackedDate | lastConnected | The date and time the EDMuser connected to the actual EDMserver. |
long | currentUser | This element is unequal zero if the current tEdmiWhoIsOn record is for the calling client. |
char | userName | The EDMuser name of the actual EDMserver client. |
char | groupName | The EDMgroup name the actual client has logged on as. |
char | opsysUserName | The name of the user account the client have logged on the operating system under, i.e., UNIX or Windows user account, not EDMuser account. |
char | hostName | Name of the host running the actual client. |
Arguments
Type | Name | Comment |
SdaiInteger | numberOfConnections | Address of a variable that will receive the number of currently connected clients to the actual EDMserver. |
tEdmiWhoIsOn | pWhoIsOn | Address of a variable that will receive the address of an array with tEdmiWhoIsOn structure, each element giving information about one active EDM client. This array will have <numberOfConnections> elements. This array is located in a static buffer in EDMinterface that can be overwritten by the next EDMinterface function. |
Return Value
Options
Example
EdmiError rstat;
SdaiInteger numberOfConnections;
tEdmiWhoIsOn *pWhoIsOn;
EdmiDate date;
EdmiStringDate stringDEate;
int i;
. . .
if (rstat = edmiWhoIsOn (&numberOfConnections, &pWhoIsOn)) {
/* Error in operation */
printf("\nError: %s in edmiWhoIsOn \n",
edmiGetErrorText(rstat));
goto error;
}
for (i = 0; i < numberOfConnections; i++) {
if (pWhoIsOn->currentUser) {
printf("\n===> ");
} else {
printf("\n ");
}
printf("Task%3ld : UserName.......: %s",
pWhoIsOn->taskNo, pWhoIsOn->userName);
printf("\n GroupName......: %s", pWhoIsOn->groupName);
printf("\n HostName.......: %s", pWhoIsOn->hostName);
printf("\n Logged on as...: %s", pWhoIsOn->opsysUserName);
printf("\n Connected......: ");
edmiUnpackDate(pWhoIsOn->lastConnected, &cDate, &stringData, 0);
printf("%s\n", stringData);
++pWhoIsOn;
}
printf("\n");
. . .
See also
Filter by label
There are no items with the selected labels at this time.