# IRsUnknownPackage Interface Reference

Inherits IRsObject.

List of all members.

## Public Member Functions
HRESULT | Initialize ([in] IRsUnknownPackage *pParentPackage)
HRESULT | UnInitialize (void)
HRESULT | OnSysMessage ([in] MSGID msgId,[in] IRsUnknownMsg *pMsg)
HRESULT | GetNodeFactory ([out, retval] IRsNodeFactory **ppNodeFactory)
HRESULT | GetCmdFactory ([out, retval] IRsCmdFactory **ppCmdFactory)
HRESULT | GetDataObjFactory ([out, retval] IRsDataObjFactory **ppDataObjFactory)

## Detailed Description

IRsUnknownPackage represents the base communication interface used for package integration into the system. The Package allows easy extensibility for the following predefined object types:
• nodes for object-constrain graph and global attributes for nodes.
• commands and script named items – object used for script parsing.
• data objects used in attributes of nodes.
Objects are instanced using factory objects, which are provided by packages. For nodes it is the node factory object, for commands it is the command factory object and for data objects it is the data object factory. For each object type, the factory also provides a list of descriptors, which are used by the system to obtain identification and additional data about objects.
Registered packages communicate with each other using system messages. The system message describes: • unique message identification. • msg data object used for additional data.

A system message is broadcast to all registered packages in the system. Package can define their own custom message and msg data object.

## Member Function Documentation

HRESULT IRsUnknownPackage::Initialize | ( | [in] IRsUnknownPackage * | pParentPackage | ) |

Package initialization, do any dependencies initialization here pParentPackage Parent package.

HRESULT IRsUnknownPackage::UnInitialize | ( | void |  | ) |

Deinitialization of package, release all internal data here.

HRESULT IRsUnknownPackage::OnSysMessage | ( | [in] MSGID | msgId,
|  | [in] IRsUnknownMsg * | pMsg |
| ) |  |  |

System message handler. Do custom handling of system messages here. The following base system messages are supported:
• register – sent when package is registered to the system.
• unregister – sent when package is unregistered from the system.
• systemready – system is in ready state, context is initialized.
• shutdown – system is in shutdown process.

Parameters:

  | msgId | [in] Id of message.
  | pMsg | [in] Message being delivered to package.

HRESULT IRsUnknownPackage::GetNodeFactory | ( | [out, retval] IRsNodeFactory ** | ppNodeFactory | ) |

Retrieve node factory of this package.
Node factory should be able to create every node which is implemented in package.

Returns:
  ppNodeFactory [out,retval] Pointer to factory to fill.

HRESULT IRsUnknownPackage::GetCmdFactory | ( | [out, retval] IRsCmdFactory ** | ppCmdFactory | ) |

Retrieve command factory for this package.
Command factory should be able to create every command which is implemented in package.

Returns:
  ppCmdFactory [out,retval] Pointer to factory to fill.

HRESULT IRsUnknownPackage::GetDataObjFactory | ( | [out, retval] IRsDataObjFactory ** | ppDataObjFactory | ) |

Retrieve data object factory for this package.
Data object factory should be able to create every data object which is implemented in package.

Returns:
  ppCmdFactory [out,retval] Pointer to factory to fill.