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 Action;

UBYTE Offline;

int DataSize;

UBYTE Data[247];

} SK_ConfigSwitch;

C Structure Response

typedef struct {

int Status;

int XLStatus;

} SK_ConfigSwitchAck;

C++ Class

class SKC_ConfigSwitch : public SKC_ToolkitMessage {

public:

UBYTE getAction() const;

void setAction(UBYTE x);

UBYTE getOffline() const;

void setOffline(UBYTE 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);

};