SetCategoryName

Sets a string to associate to a log ID.

Syntax

KsError SetCategoryName(
     int Category,
     wchar_t* Name
);

Parameters

Category: the ID you want to assign this name to. The ID doesn't have to start from zero or in sequence.

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

Usable EtherCAT states

ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

Example

Copy
/*
*    Assume an user-defined enumeration:
*
*    typedef enum
*    {
*        userMain = 0,
*        userCommander,
*        userObserver,
*        END_USERMODULE
*    } userModule;
*/

nRet = SetCategoryName(userMain, L"Main loop");
nRet = SetCategoryName(userCommander, L"Commander class");
nRet = SetCategoryName(userObserver, L"Observer class");

Requirements

  RT Win32
Minimum supported version 4.1 4.1
Header ksapi.h ksapi.h
Library KsApi_Rtss.lib KsApi.lib

See also

DebugMessage

GetCategoryName