Documentation
RequireParent
Require: IP-Symcon >= 4.0
boolean RequireParent (string $ParentGUID)
Parameters
ParentGUID |
Returns
If the command succeeds, it returns TRUE, otherwise FALSE.
Description
This function is not available for IPSModuleStrict. Please consider using the new GetCompatibleParents function
If there is no connection, a parent instance with the GUID ParentGUID is created. Even if there was a compatible parent instance.
The normal case for the function is a splitter module, which requires its own I/O instance when it is created. Alternatively, ForceParent may also be suitable.
Normally, this function is called only in the Create() or ApplyChanges() method.
Example
// IPSModuleStrict
ConnectParent/RequireParent/ForceParent is not available,
but can be replaced by the new function “GetCompatibleParents()”.
// IPSModule
public function Create() {
// Never remove the line!
parent::Create();
// Connect to the newly created splitter if there is no connection yet
$this->RequireParent("{46C969BF-3465-4E3E-B2A5-E404FB969735}");
}