sk_sendMsgStruct()

Description

The sk_sendMsgStruct() function is a convenience function that first packs a message, and then calls sk_sendMessageWithHandler(). This message is also available as sk_sendMsgStructOnConnection() and skts_sendMsgStruct().

Syntax

int sk_sendMsgStruct(MsgStruct *aMsgStruct, void *aTag,
HandlerFunc *aHandlerFunc);

int sk_sendMsgStructOnConnection(MsgStruct *aMsgStruct, void *aTag, HandlerFunc *aHandlerFunc, int aConID);

int skts_sendMsgStructOnConnection(MsgStruct *aMsgStruct, void *aTag, HandlerFunc *aHandlerFunc, int aConID);

 

Parameters

The function parameters are shown in the table below.

Argument

Description

*aMsgStruct

Pointer to a generic C Structure representing a 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.

SK_UNKNOWN_MSG_
TYPE

The tag field of this MsgStruct is invalid. Did you call sk_initMsg()?

SK_UNKNOWN_MSG_
BUF

Buffer and Size pointers do not point to a valid message.

SK_NO_CONNECT_
AVAIL

The specified connection from OnConnection() is not available or valid.