GetCategoryName
Gets a string assigned to a log ID.
Syntax
KsError GetCategoryName(
int Category,
wchar_t* Name
);
Parameters
Category: the ID you want to get the string from.
Name: a human-readable string that describes the ID. Limited to 64 characters.
Return value
If the function succeeds, it returns errNoError
, otherwise an error code. For more information about the error code, see the KsError list.
Remarks
The Name string uses UTF-16 encoding.
Usable EtherCAT states
ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP
Example
Copy
/*
* Assume an user-defined enumeration:
*
* typedef enum
* {
* userMain = 0,
* userCommander,
* userOserver,
* END_USERMODULE
* } userModule;
*/
wchar_t catName[64] = { 0 };
nRet = GetCategoryName(userMain, catName);
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.1 | 4.1 |
Header | ksapi.h | ksapi.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also