You are here: SwitchKit® Development Environment Programmer’s Guide > 6 Handler Functions > sk_setChannelHandler()

sk_setChannelHandler()

Description

The sk_setChannelHandler() function installs aHandlerFunc as the handler. If there is currently a stack of handler functions, it is cleared first. This function is also available as skts_setChannelHandler().

Syntax

int sk_setChannelHandler(int aSpan, int aChannel, void *aTag, HandlerFunc* aHandlerFunc);

Threadsafe Syntax

int skts_setChannelHandler(int aSpan, int aChannel, void *aTag, HandlerFunc* aHandlerFunc);

Parameters

The function parameters are shown in the table below.

Argument | Description
--- | ---
aSpan | Specifies the span.
aChannel | Specifies the channel.
aTag | An application defined pointer which will be returned to the application when a handler is invoked.
aHandlerFunc | A pointer to a function that is designed to handle messages.

Return Values

Always returns OK.