You are here: CSP API Reference > 1 EXS & SwitchKit API Messages > ConfigSwitch

ConfigSwitch

Type:

SwitchKit API message

Purpose

Use the SK_ConfigSwitch message to dynamically configure the switch without sending a configuration file.

Description

SK_ConfigSwitch uses the bytes of the message as parameters. The acknowledgement SK_ConfigSwitchAck contains a status value from SwitchKit and a status value from the switch.

How to use SK_ConfigSwitch

You have to declare a C Structure to contain a configuration that will be sent to the switch. Use the function sk_packMessage(MsgStruct *m, char *data, int *NumBytes) to find out the fields NumBytes and Data. Send the message to the LLC using its member function send(). Wait for an acknowledgment, the status fields give information about the configuration message.

When you send the SK_ConfigSwitch message, SwitchManager extracts it using the function sk_unpackMessage() and sends the extracted information to the switch. Before SwitchManager can send an acknowledgment, if must wait until the switch processes the configuration. During this time, it is not possible to send another SK_ConfigSwitch message to the switch. If another SK_ConfigSwitch message is sent before receiving an acknowledgment, SwitchManager will NACK the second message.The SKStatus field will indicate this with SK_NOT_READY.

Sent by

CSA or Application

Field Values

The following table shows the possible field values for this message:

Field | Values and Description
--- | ---
Action | • 0 = Do not send or process the message yet, there are more to come. SwitchManager stores the message in a TEMP collection. • 1 = Send this message and all the messages previously added using Action set to 0.
Offline | • 0 = Process and send the message. • 1 = Process the message but do not send it.

C Structure

typedef struct {

UBYTE Target;

UBYTE Type;

UBYTE MsgFormat;

UBYTE Action;

UBYTE Offline;

int Tag1;

int Tag2;

char AppGroupTarget[32];

int DataSize;

UBYTE Data[204];

} SK_ConfigSwitch;

C Structure Response

typedef struct {

int Status;

int XLStatus;

} SK_ConfigSwitchAck;

C++ Class

class SKC_ConfigSwitch : public SKC_ToolkitMessage {

public:

UBYTE getTarget() const;

void setTarget(UBYTE x);

UBYTE getType() const;

void setType(UBYTE x);

UBYTE getMsgFormat() const;

void setMsgFormat(UBYTE x)

UBYTE getAction() const;

void setAction(UBYTE x);

UBYTE getOffline() const;

void setOffline(UBYTE x);

int getTag1() const;

void setTag1(int x);

int getTag2() const;

void setTag2(int x);

const char *getAppGroupTarget() const;

void setAppGroupTarget(const char *x);

int getDataSize() const;

void setDataSize(int x);

const UBYTE *getData() const;

UBYTE *getData();

void setData(UBYTE *x);

};

C++ Class Response

class SKC_ConfigSwitchAck : public SKC_ToolkitAck {

public:

int getStatus() const;

void setStatus(int x);

int getXLStatus() const;

void setXLStatus(int x);

};

Negative acknowledgement to a message.
See Converged Services Administrator.