sk_requestRouteControlledChannel()

Description

This function is similar to sk_requestChannel(), except that it automatically outseizes the allocated channel with the XL_RouteControl message before returning it. If successful, the application receives notification of the channel it was assigned, in addition to any acknowledgments to the route control request. If there is glare or some other error condition, the LLC automatically tries another channel. This process is repeated up to nRetries times. If there is a problem with all the channels tried, the application is notified with a message containing the last error condition. The aTag and aHandlerFunc are comparable to the tag and handler function arguments passed to sk_sendMsgStruct.

This function causes SK_RouteControlledChannelAck,an acknowledgment message, to be sent to your application after processing has been completed. This message contains the span and channel allocated to the application module. The channel is now allocated to the application module, and all future messages for that channel are routed to this process.

This function is also available as sk_requestRouteControlledChannelOnConnection() and skts_requestRouteControlledChannel.

Syntax

int sk_requestRouteControlledChannel(char *aChannelGroup, int aNumRetries, XL_RouteControl *aRouteControlMsg, void *aTag, HandlerFunc *aHandlerFunc);

int sk_requestRouteControlledChannelOnConnection(char *aChannelGroup, int aNumRetries, XL_RouteControl *aRouteControlMsg, void *aTag, HandlerFunc *aHandlerFunc, int aConID);

 

int skts_requestRouteControlledChannel( char *aChannelGroup, int aNumRetries, XL_RouteControl *aRouteControlMsg, void *aTag, HandlerFunc *aHandlerFunc, int aConID );

Parameters

The function parameters are shown in the table below.

Argument

Description

aChannelGroup

Specifies the channel group.

aNumRetries

Limits the number of attempts to find a channel before an error gets send to the application module.

aRouteControlMsg

Pointer to EXS API message.

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.

aConID

aConID is a connection identifier specified at connection creation time and used to indicate which LLC an application wishes to communicate with.

Return Values

Possible return values for this function:

SK_LOST_LLC

This return value indicates that your application lost contact with the LLC.