OpenDOF Project
DOFConnection DOF_CreateConnection ( DOF  self,
DOFConnectionConfig  config 
)

Creates a DOFConnection that uses the specified configuration.

The connection is associated with the DOF instance that creates it, and only that DOF can route operations through it (see DOF).

This function may be used to create the following types of connections:

This function may not be used to create the following types of connections:

For more information about these connection types, see DOFConnectionType.

Connections do not connect automatically when created. After creating the connection, call DOFConnection_Connect or DOFConnection_BeginConnect. To disconnect temporarily, call DOFConnection_Disconnect. Disconnected connections can be reconnected using DOFConnection_Connect or DOFConnection_BeginConnect. When the DOFConnection is no longer needed, it must be destroyed. See DOFConnection_Destroy. Destroyed connections cannot be reconnected.

The internal library tracks references to duplicate connections, so this function can safely be called multiple times with the same configuration without consuming extra resources. Such duplicate connections are frequently needed, especially by nodes that create connections dynamically in response to other function calls.

Resource Management:
This function allocates resources that must later be freed by calling DOFConnection_Destroy.
Parameters
selfThe DOF instance to use to create the DOFConnection. This must not be NULL.
configAn instance of DOFConnectionConfig that represents a source of configuration parameters for the DOFConnection. Use DOFConnectionConfigBuilder to create an instance of DOFConnectionConfig. This should not be NULL.
Returns
A new instance of DOFConnection.
Exceptions
NULLis returned if the configuration is invalid, the DOF cannot accept the new DOFConnection, or the DOFConnection could not be created.
See Also
DOF_Close
DOFOperationControl_SetTargetConnection
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22