return;
}
//If a tagprefix exists
if (pszTagPrefix)
{
//Get the length of the string
nTagPrefixLen = strlen(pszTagPrefix);
}
//Get the length of the tag
nTagLen = strlen("TagName");
//Check if the lenght of the
//ServerPrefix+TagPrefix+VarName + the double points < MAX_DM_VAR_NAME)
if (nServerPrefixLen + nTagPrefixLen + nTagLen+2 < MAX_DM_VAR_NAME)
{
sprintf(myTagName,"%s::%s%s",pszServerPrefix,pszTagPrefix,"TagName");
//User defined code where the
//user can do something with the return value
...
}
Else
{
printf("The resulting string is too long.");
return;
}
}
1. Initialize the myTagName tag.
2. Read out the server prefix, the tag prefix and the window prefix.
3. If no server prefix has been returned, a text ist output and the function is terminated.
4. If a server prefix has been returned, determine its length and temporarily store it in
nServerPrefixLen.
5. If a tag prefix has been returned, determine its length and temporarily store it in TagPrefixLen.
6. Determine the length of the tag name and temporarily store it in nVarLen.
7. If the length permitted for tag names is exceeded a text is output and the function is
terminated.
8. If the length permitted for tag names is not exceeded, the tag name required for a client
environment is compiled.
9. Executing user-defined code for processing return values.
GetServerTagPrefix example
{
char* pszServerPrefix;
char* pszTagPrefix;
ANSI-C function descriptions
3.4 Appendix
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
1492
System Manual, 11/2008,