You are here: SwitchKit® Development Environment Programmer’s Guide > 3 Channel Management > sk_setChannelHandler()

sk_setChannelHandler()

Description

You can use the sk_setChannelHandler() function to organize the flow of messages for your application. Once a channel has been assigned to an application, the sk_setChannelHandler() function causes the specified handler function to be called whenever a CSP-initiated message arrives on a span and channel. This function does not affect the routing of any acknowledgment messages.

Syntax

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

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

Parameters

The function parameters are shown in the table below.

Argument | Description
--- | ---
aSpan | Span identifies the span number.
aChannel | Chan identifies the channel number.
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.

Range of channels provided by T1 or E1 transmission service. A physical span is a group of channels taking up a single physical wire. A logical span is a group of channels taking up less than a single logical wire, or carried over more than one physical wire.