edmiRemoteVersion
EdmiError edmiRemoteVersion(SdaiServerContext serverContextId, SdaiClientId clientId, SdaiInteger *serverVersion, SdaiInteger *localEdmiVersion, SdaiString *serverVersionText, SdaiString *localEdmiVersionText, SdaiInvocationId *edmiInvocationId);
Reads the version info of an EDMserver or an EDMapplicationServer process from a thin EDMclient. Two versioned modules constitute the EDMserver and the EDMapplication server; the server application it self, and the library comprising all the EDMInterface/C API functions. For a thin EDMclient to work properly with a Server Room they must be based on a compatible version of the EDMInteface . EDMapplicationServer processes are basically thick EDMclients that are connected to the EDMserver They are identified by their clientIds which may be determined by a call to the edmiRemoteWhoIsOn function (see the example below). If the clientId argument is set to zero, this function will return version info for the EDMserver A version is identified by an integer number and a corresponding textual sting. The version info returned from this function might be;
Argument | Return Value |
serverVersion | 20050308 |
localEdmiVersion | 20050308 |
serverVersionText | EXPRESS Data Manager Server Version 4.7.041b Dec 15 2005 |
localEdmiVersionText | EXPRESS Data Manager fat client system - Version 4.7.041b Dec 15 2005 |
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiClientId | clientId | The clientId that identifies the EDMapplicationServer process for which to return version info. If this argument is zero, the version info for the _EDMserver_ will be returned |
SdaiInteger | serverVersion | A variable that will receive an integer number that identifies the version of the EDMserver{_}_ or the EDMapplicationServer. |
SdaiInteger | localEdmiVersion | A variable that will receive an integer number that identifies the version of the EDMInterface{_}_ library used by the EDMserver{_}_ or the EDMapplicationServer. |
SdaiString | serverVersionText | A variable that will receive a textual string that identifies the version of the EDMserver{_}_ or the EDMapplicationServer. |
SdaiString | localEdmiVersionText | A variable that will receive a textual string that identifies the version of the EDMInterface library used by the EDMserver or the EDMapplicationServer. |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Options
Example
/* Check that all the EDMapplicationServers use the same version of the EDMInterface as does the EDMserver */ int i; EdmiError rstat; SdaiServerContext suContext; tEdmiWhoIsOnServer *pWhoIsOn; tEdmiConnection *connect; SdaiInteger nConnect, nAppServer; SdaiInteger versionId, edmiVersionId; SdaiString version, edmiVersion; SdaiString hostName, clientName; /* Define Remote Server Context for the superuser */ rstat = edmiDefineServerContext("SuperUserContext", "superuser", NULL, "xfx56kl9", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &suContext); /* Get the version info for the EDMserver */ rstat = edmiRemoteVersion(suContext, 0, &versionId, &edmiVersionId, &version, &edmiVersion, NULL); /* We do not need version strings for this */ edmiFree(version); edmiFree(edmiVersion); /* Find all connected thick EDMclients */ rstat = edmiRemoteWhoIsOn(suContext, &nConnect, &pWhoIsOn, NULL); connect = pWhoIsOn->connections; nAppServer = 0; for (i=0;i<nConnect;i++) { rstat = edmiRemoteGetClientNames(suContext, connect->clientId, &hostName, &clientName, NULL); if (strstr(clientName, "EDMapplicationServer-") && strstr(clientName, " Main Client") ) { SdaiInteger _edmiVersionId; /* Get the version info for the EDMapplicationServer */ rstat = edmiRemoteVersion(suContext, connect->clientId, &versionId, &_edmiVersionId, &version, &edmiVersion, NULL); /* We do not need version strings for this */ edmiFree(version); edmiFree(edmiVersion); /* Compare the EDMInterface library versions */ if (edmiVersionId != _edmiVersionId) { printf("\nWARNING: The EDMapplicationServer"); printf(" with client Id %d", connect->clientId); printf(" running at host %s", hostName); printf(" uses an EDMInterface library with a"); printf(" version number (%d) that does", _edmiVersionId); printf(" not match that of the EDMserver (%d)", edmiVersionId); } } edmiFree(hostName); edmiFree(clientName); } . . .
See also
Filter by label
There are no items with the selected labels at this time.