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

sk_setChannelData() / sk_getChannelData()

Description

This function sk_setChannelData() allows you to associate arbitrary data with a specific channel. To clear the data associated with a channel, just enter NULL as data.

The function sk_getChannelData() allows the retrieval of arbitrary data that was stored with sk_setChannelData(). If nothing was ever set, then the function returns NULL.

Syntax

int sk_setChannelData(int aSpan, int aChannel, void *someData);

int sk_getChannelData(int aSpan, int aChannel);

Threadsafe Syntax

void skts_setChannelData( int aSpan, int aChannel, void *someData);

void skts_getChannelData( int aSpan, int aChannel);

Parameters

The function parameters are shown in the table below.

Argument | Description
--- | ---
aSpan | Indicates the span number.
aChannel | Indicates the channel number.
someData | Data pointer.