Documentation
ConnectParent
Require: IP-Symcon >= 4.0
boolean ConnectParent (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
The function connects the instance with an existing compatible parent instance. If this is not available, one will be created and subsequently connected. A list of the available moduleIDs (GUID) can be found here.
The typical use case for this function is a device module that wants to connect to a splitter. A new one is only created if there is no splitter available.
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 an existing splitter or create a new one if necessary
$this->ConnectParent("{46C969BF-3465-4E3E-B2A5-E404FB969735}");
}