OpenDOF Project
Macros | Typedefs | Functions
DOFConfig
DOF

The DOFConfig class specifies the initial configuration to use when creating a DOF. More...

Macros

#define DOFCONFIG_DEFAULT_RANK
 A mid-range value (128), so that the default desire to manage a secure multicast group is neither strong nor weak.
 

Typedefs

typedef struct DOFConfig_t * DOFConfig
 The configuration for a DOF instance.
 
typedef struct DOFConfigBuilder_t * DOFConfigBuilder
 The configuration builder to build a DOFConfig from.
 
typedef struct DOFState_t * DOFState
 The configuration state.
 

Functions

void DOFConfig_Destroy (DOFConfig self)
 Destroys a DOFConfig.
 
DOFObjectIDSource DOFConfig_GetSourceID (DOFConfig self)
 Gets the identifier that DOFs created from this DOFConfig will use for operations in the unsecured domain.
 
uint32 DOFConfig_GetConnectionLimit (DOFConfig self)
 Gets the maximum number of connections that DOFs created from this DOFConfig will support.
 
uint16 DOFConfig_GetThreadPoolSize (DOFConfig self)
 Gets the maximum number of threads that DOFs created from this DOFConfig will have in their thread pool.
 
boolean DOFConfig_IsRouter (DOFConfig self)
 Discovers whether DOFs created from this DOFConfig will have routing set to true.
 
uint8 DOFConfig_GetRank (DOFConfig self)
 Gets the node rank that DOFs created from this DOFConfig will have.
 
boolean DOFConfig_IsParameterValidation (DOFConfig self)
 Checks whether DOFs created from this DOFConfig will validate DOFValue objects to verify that the associated DOFType matches a required type.
 

Builder

The DOFConfigBuilder class enables you to customize the configuration of a DOF.

The DOFConfigBuilder_Create function returns a DOFConfigBuilder with all the configuration parameters for a DOF set to their defaults. You can then pass the DOFConfigBuilder to DOFConfigBuilder functions to change the initial configuration parameters. You do not need to set any configuration parameters that you wish to leave at their default settings.

When you have finished setting configuration parameters, you use DOFConfigBuilder_Build or DOFConfigBuilder_BuildAndDestroy to create an immutable DOFConfig object that stores all the chosen settings. Pass that DOFConfig to DOF_Create to create your customized DOF.

For example, by default DOFs cannot be proxies. To create a DOF that is capable of being a proxy node, you must set routing to true, as in the following example:

     bldr = DOFConfigBuilder_Create();
     DOFConfigBuilder_SetRouter(bldr, TRUE);
     config = DOFConfigBuilder_BuildAndDestroy(bldr);
     dof = DOF_Create(config);
     DOFConfig_Destroy(config);
     ...
     DOF_Destroy(dof);

The following are the default configuration parameters:

You can also use DOFConfigBuilder_Create_Config and DOFConfigBuilder_Create_State to create DOFConfigBuilders whose initial configuration parameters are based on another DOFConfig or on another DOF's state, rather than on the defaults. Just as with the default DOFConfigBuilder, you would then change any configuration parameters that need to be changed, and then build a new DOFConfig with the new settings.

DOFConfigBuilder DOFConfigBuilder_Create (void)
 Creates a DOFConfigBuilder with configuration parameters set to their defaults.
 
DOFConfigBuilder DOFConfigBuilder_Create_State (const DOFState state)
 Copies configuration parameters from a DOFState and creates a DOFConfigBuilder with the same initial configuration parameters.
 
DOFConfigBuilder DOFConfigBuilder_Create_Config (const DOFConfig config)
 Copies configuration parameters from a DOFConfig and creates a DOFConfigBuilder with the same initial configuration parameters.
 
boolean DOFConfigBuilder_SetSourceID (DOFConfigBuilder self, DOFObjectIDSource sourceID)
 Sets the identifier that is used for the DOF's operations in the unsecured domain.
 
boolean DOFConfigBuilder_SetConnectionLimit (DOFConfigBuilder self, uint32 max)
 Sets the maximum number of simultaneous connections, both inbound and outbound, that a DOF can support.
 
boolean DOFConfigBuilder_SetThreadPoolSize (DOFConfigBuilder self, uint16 count)
 Sets the maximum number of threads that a DOF can create to process operations.
 
boolean DOFConfigBuilder_SetRouter (DOFConfigBuilder self, boolean isRouter)
 Sets whether a DOF will route operations other than those it directly requests or provides.
 
boolean DOFConfigBuilder_SetRank (DOFConfigBuilder self, uint8 rank)
 Sets the node's desire to manage a secure multicast group.
 
boolean DOFConfigBuilder_SetParameterValidation (DOFConfigBuilder self, boolean validation)
 Sets whether the DOF validates DOFValue objects to verify that their associated DOFType matches the type required for an interface item.
 
DOFConfig DOFConfigBuilder_Build (DOFConfigBuilder self)
 Builds a DOFConfig based on the parameters set in this DOFConfigBuilder.
 
DOFConfig DOFConfigBuilder_BuildAndDestroy (DOFConfigBuilder self)
 Builds a DOFConfig based on the parameters set in this DOFConfigBuilder and destroys the DOFConfigBuilder.
 
void DOFConfigBuilder_Destroy (DOFConfigBuilder self)
 Destroys this DOFConfigBuilder.
 

Detailed Description

The DOFConfig class specifies the initial configuration to use when creating a DOF.

To instantiate this class, you use methods of DOFConfigBuilder to set configuration parameters, and call DOFConfigBuilder_Build or DOFConfigBuilder_BuildAndDestroy to return a DOFConfig when you have finished setting the desired parameters. You then pass the instantiated DOFConfig to DOF_Create to instantiate a DOF.

The methods of this class are mostly getters for the parameters set using DOFConfigBuilder. Use these getters to get information about a DOFConfig that may or may not have been used to instantiate a DOF. To instead get current information about a DOF instance, use the methods of DOFState.

core-c-dof-oal Version 8.0.1 Build 0
2018-01-22