RegisterAsRedundantApp

Type

SwitchKit API message

Description

The SK_RegisterAsRedundantApp message is used by the function sk_registerAsRedundant().

If an application needs to register for membership into a Redundant Application Pool (RAP), the application must call the function sk_registerAsRedundant(). The function then uses the SK_RegisterAsRedundantApp message to register the application for membership into a RAP.

To remove an application from a pool, the application calls the function sk_deregisterAsRedundant(), which then also uses the message to take a member out of the pool.

A SK_RegisterAsRedundantAppAck message is an acknowledgment by the LLC, indicating the completion of the original request.

Sent by

Function sk_registerAsRedundant()

Arguments

You can modify the following arguments:

Argument

Description

AppName

AppName is the application name of the requesting application. The name can be obtained by calling sk_getConnectionName().

RedundantAppPoolID

The RedundantAppPoolID is a string that uniquely identifies the class of application wishing to be treated as redundant applications.

Notes: RAP IDs are case sensitive.

RedundantAppPriority

RedundantAppPriority is a value indicating the current priority of the application. The higher the value, the more likely it is that the LLC will select the application as primary. Predefined values are:

SK_RED_APP_PRI_MONITOR (0)
Used by an application wishing to monitor the activity of this RedundantAppClass. An application selecting this priority cannot be considered either primary or secondary.

SK_RED_APP_PRI_REMOVED (-1)
Used when an application needs to be removed from an RedundantAppClass for which it has previously registered.

DataSize

Size of the data

Data

Data bytes

C Structure

typedef struct {

int AppName;

char RedundantAppPoolID[32];

int RedundantAppPriority;

unsigned short InitiateSwitchover

unsigned short DataSize;

UBYTE Data[211];

} SK_RegisterAsRedundantApp;

C Structure Response

typedef struct {

int Status;

int AppName;

char RedundantAppPoolID[32];

int RedundantAppPriority;

unsigned short InitiateSwitchover

} SK_RegisterAsRedundantAppAck;

C++ Class

class SKC_RegisterAsRedundantApp : public SKC_ToolkitMessage {

public:

int getAppName() const;

void setAppName(int x);

const char *getRedundantAppPoolID() const;

void setRedundantAppPoolID(const char *x);

int getRedundantAppPriority() const;

void setRedundantAppPriority(int x);

unsigned short getInitiateSwitchover() const;

void setInitiateSwitchover(unsigned short x);

unsigned short getDataSize() const;

void setDataSize(unsigned short x);

const UBYTE *getData() const;

UBYTE *getData();

void setData(UBYTE *x);

};

C++ Class Response

class SKC_RegisterAsRedundantAppAck : public SKC_ToolkitAck {

public:

int getStatus() const;

void setStatus(int x);

int getAppName() const;

void setAppName(int x);

const char *getRedundantAppPoolID() const;

void setRedundantAppPoolID(const char *x);

int getRedundantAppPriority() const;

void setRedundantAppPriority(int x);

unsigned short getInitiateSwitchover() const;

void setInitiateSwitchover(unsigned short x)

};