OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

agentserverutils.c
It contains the util methods used by AgentServer.
Return Type Method Summary
CHAR CheckExternalIndexValue(IndexAttribute *indexAttrbs, CHAR *name, CHAR *value)
             Checks whether the index is a valid index value.
CHAR CompareModuleRegInfo(Node *ptr1, Node *ptr2)
             This function compares keys of nodePtrs.
OID* CreateInstance(ModuleInfo *moduleInfoPtr, CHAR **indexes, INT32 *indexesLen, INT32 len, INT32 *instanceLen, CHAR impliedIndex)
             Creates the instance according to the type of the indexes.
ObjectName* CreateObjectName(CHAR *key)
             It will create an instance of ObjectName using the given key.
CHAR CreateOptimizeSearchArray()
             This function creates an array of type OptSearchInfo for each attribute and stores in the structure the module Info Ptr of each attribute.
void FreeAgentServerTable(Vector *vect)
             It will free the given AgentServer table which will have all registered manageable modules.
void FreeIndexes(U_CHAR **indexes, INT32 *indexesLen, INT32 indLen)
             Frees the memory allocated for the indexes.
void FreeManagementResources()
             Frees the management resources allocated.
void FreeNotificationListenerTable(Vector *vect)
             It will delete notification listener Entry from the given Vector.
void FreeObjectName(ObjectName *objName)
             It will free the given ObjectName reference.
void* GetAttribInfo(ModuleInfo *moduleInfoPtr, CHAR *columnName, CHAR isTable)
             Gets the corresponding column/scalar Attribute Information based on the column name coming as argument from given moduleInfoPtr.
ColumnAttributeInfo* GetColumnAttributeInfo(IndexAttribute index)
             It will return the column Attribute pointer of the given index .
INT32 GetExternalIndexCount(ModuleInfo *moduleInfoPtr)
             Counts external indexes.
U_LONG GetIncrementedSeqNum(U_LONG *seqNum)
             It will increment the given sequence number and return the incremented value.
INT32 GetIndexAttributeIndex(ModuleInfo *moduleInfoPtr, CHAR *name)
             This function find out the index of the column Attribute for the given index name.
ModuleInfo* GetModuleInfoFromOptArray(CHAR *attrbName)
             It will search for the attribute name in the gv_optimizeArray and returns the corresponding moduleInfoPtr.
U_CHAR* GetOrGetNextRowPtr(ModuleInfo *moduleInfoPtr, CHAR **indexes , INT32 *indexesLen , INT32 startIdx, INT32 numOfRows, U_CHAR command)
             It will find out the corresponding row ptr which matches the given indexes.
ColumnAttributeInfo* GetRowStatusColumnPtr(ModuleInfo *moduleInfoPtr)
             Gets the Row status column Attribute Information for the given module.
CHAR IsExternalIndexName(ModuleInfo *mInfoPtr, CHAR *indexName)
             It will find out whether the given indexname is an external index or not.
CHAR IsTableContainsRowStatusCol(ModuleInfo * moduleInfoPtr)
             It checks whether table cantains row status column or not.
void SortOptimizeArray()
             This function sorts the Optimal Search Array.
   
Method Details

CheckExternalIndexValue()

CHAR CheckExternalIndexValue(IndexAttribute *indexAttrbs, CHAR *name, CHAR *value)

Checks whether the index is a valid index value.

Arguments:
1.indexAttrbsPtr(IN).
2.Value(IN).
Return type:
YES/NO.
Bugs:
null

CompareModuleRegInfo()

CHAR CompareModuleRegInfo(Node *ptr1, Node *ptr2)

This function compares keys of nodePtrs.

Arguments:
1. nodePointer1 (IN).
2. nodePointer2 (IN).
Return type:
< 0, if nodePtr1key is less than nodePtr2key > 0, if nodePtr1key is greater than nodePtr2key == 0, if nodePtr1key is equal to nodePtr2key
Bugs:
null

CreateInstance()

OID* CreateInstance(ModuleInfo *moduleInfoPtr, CHAR **indexes, INT32 *indexesLen, INT32 len, INT32 *instanceLen,CHAR impliedIndex)

Creates the instance according to the type of the indexes.

Arguments:
1.entryInfoPtr(IN).
2.indexes Pointer(IN).
3.indexesLen(IN).
4.num of indexes(IN).
5.instanceLength(IN/OUT).
Return type:
Instance Pointer.
Bugs:
null

CreateObjectName()

ObjectName* CreateObjectName(CHAR *key)

It will create an instance of ObjectName using the given key.

Arguments:
1. Key of the ObjectName (IN).
Return type:
Created ObjectName reference or NULL.
Bugs:
null

CreateOptimizeSearchArray()

CHAR CreateOptimizeSearchArray()

This function creates an array of type OptSearchInfo for each attribute and stores in the structure the module Info Ptr of each attribute.

Arguments:
Nothing.
Return type:
Exit Status.
Bugs:
null

FreeAgentServerTable()

void FreeAgentServerTable(Vector *vect)

It will free the given AgentServer table which will have all registered manageable modules.

Arguments:
1. Vector to free (IN)
Return type:
Nothing.
Bugs:
null

FreeIndexes()

void FreeIndexes(U_CHAR **indexes, INT32 *indexesLen, INT32 indLen)

Frees the memory allocated for the indexes.

Arguments:
1.indexes Pointer(IN).
2.indexesLen(IN).
3.num of indexes(IN).
Return type:
Nothing.
Bugs:
null

FreeManagementResources

void FreeManagementResources()

Frees the management resources allocated.

Arguments:
Nothing.
Return type:
Nothing.
Bugs:
null

FreeNotificationListenerTable()

void FreeNotificationListenerTable(Vector *vect)

It will delete notification listener Entry from the given Vector.

Arguments:
1. Vector to free (IN)
Return type:
Nothing.
Bugs:
null

FreeObjectName()

void FreeObjectName(ObjectName *objName)

It will free the given ObjectName reference.

Arguments:
1. ObjectName reference (IN/OUT).
Return type:
Nothing.
Bugs:
null

GetAttribInfo()

void* GetAttribInfo(ModuleInfo *moduleInfoPtr, CHAR *columnName, CHAR isTable)

Gets the corresponding column/scalar Attribute Information based on the column name coming as argument from given moduleInfoPtr.

Arguments:
1. ModuleInformationPtr (IN/OUT).
2. Column Name (IN).
3. Flag for table (IN).
Return type:
ColumnAttributeInfo/ScalarAttributeInfo reference or NULL.
Bugs:
null

GetColumnAttributeInfo()

ColumnAttributeInfo* GetColumnAttributeInfo(IndexAttribute index)

It will return the column Attribute pointer of the given index .

Arguments:
1. Index Attribute info (IN).
Return type:
Column Attribute info of the given index or NULL.
Bugs:
null

GetExternalIndexCount

INT32 GetExternalIndexCount(ModuleInfo *moduleInfoPtr)

Counts external indexes.

Arguments:
Reference to the ModuleInfo(IN)
Return type:
Index counter
Bugs:
null
See Also:

GetIncrementedSeqNum()

U_LONG GetIncrementedSeqNum(U_LONG *seqNum)

It will increment the given sequence number and return the incremented value.

Arguments:
1. Sequence Number variable (IN/OUT).
Return type:
Next Sequence Number.
Bugs:
null

GetIndexAttributeIndex()

INT32 GetIndexAttributeIndex(ModuleInfo *moduleInfoPtr, CHAR *name)

This function find out the index of the column Attribute for the given index name.

Arguments:
1. Module Info reference (IN).
2. Index name (IN).
Return type:
The order of the index Attribute in the index list.
Bugs:
null

GetModuleInfoFromOptArray()

ModuleInfo* GetModuleInfoFromOptArray(CHAR *attrbName)

It will search for the attribute name in the gv_optimizeArray and returns the corresponding moduleInfoPtr.

Arguments:
1. AttributeName (IN).
Return type:
Exit Status.
Bugs:
null

GetOrGetNextRowPtr()

U_CHAR* GetOrGetNextRowPtr(ModuleInfo *moduleInfoPtr, CHAR **indexes , INT32 *indexesLen , INT32 startIdx, INT32 numOfRows, U_CHAR command)

It will find out the corresponding row ptr which matches the given indexes.

Arguments:
1. moduleInformationPtr(IN).
2. Indexes Array(IN).
3. indexes Length
4. startIndex of the table(IN).
5. number of Rows(IN).
6. command (IN).
Return type:
Row Pointer or NULL.
Bugs:
null

GetRowStatusColumnPtr()

ColumnAttributeInfo* GetRowStatusColumnPtr(ModuleInfo *moduleInfoPtr)

Gets the Row status column Attribute Information for the given module.

Arguments:
1. ModuleInformationPtr (IN/OUT).
Return type:
ColumnattributePointer / NULL.
Bugs:
null

IsExternalIndexName()

CHAR IsExternalIndexName(ModuleInfo *mInfoPtr, CHAR *indexName)

It will find out whether the given indexname is an external index or not.

Arguments:
1. ModuleInfo reference (IN).
2. Index Name (IN).
Return type:
SUCCESS or FAILURE.
Bugs:
null

IsTableContainsRowStatusCol

CHAR IsTableContainsRowStatusCol(ModuleInfo * moduleInfoPtr)

It checks whether table cantains row status column or not.

Arguments:
ModuleInfo
Return type:
YES/NO
Bugs:
null
See Also:

SortOptimizeArray()

void SortOptimizeArray()

This function sorts the Optimal Search Array.

Arguments:
Nothing.
Return type:
Nothing.
Bugs:
null


OverView Index Help                                                                WebNMS Agent Toolkit C Edition 6 

Copyright (c) 2009 ZOHO Corp. All Rights Reserved.