EVPath
Macros | Typedefs | Functions
EVdfg functions and types

Macros

#define DFG_SOURCE   -1
 
#define DFG_STATUS_SUCCESS   0
 
#define DFG_STATUS_FAILURE   1
 

Typedefs

typedef struct _EVdfg * EVdfg
 
typedef struct _EVmaster * EVmaster
 
typedef struct _EVclient * EVclient
 
typedef struct _EVdfg_stone * EVdfg_stone
 
typedef struct _EVclient_sources * EVclient_sources
 
typedef struct _EVclient_sinks * EVclient_sinks
 
typedef void(* EVmasterJoinHandlerFunc )(EVmaster master, char *identifier, void *available_sources, void *available_sinks)
 
typedef void(* EVmasterFailHandlerFunc )(EVdfg dfg, char *failed_client, int failed_stone)
 
typedef void(* EVmasterReconfigHandlerFunc )(EVdfg dfg)
 

Functions

EVmaster EVmaster_create (CManager cm)
 
char * EVmaster_get_contact_list (EVmaster master)
 
EVclient EVclient_assoc (CManager cm, char *node_name, char *master_contact, EVclient_sources source_capabilities, EVclient_sinks sink_capabilities)
 
EVclient EVclient_assoc_local (CManager cm, char *node_name, EVmaster master, EVclient_sources source_capabilities, EVclient_sinks sink_capabilities)
 
void EVmaster_register_node_list (EVmaster master, char **list)
 
void EVmaster_node_join_handler (EVmaster master, EVmasterJoinHandlerFunc func)
 
void EVmaster_node_fail_handler (EVmaster master, EVmasterFailHandlerFunc func)
 
void EVmaster_node_reconfig_handler (EVmaster master, EVmasterReconfigHandlerFunc func)
 
void EVdfg_realize (EVdfg dfg)
 
int EVclient_ready_wait (EVclient client)
 
EVclient_sources EVclient_register_source (char *name, EVsource src)
 
EVclient_sinks EVclient_register_sink_handler (CManager cm, char *name, FMStructDescList list, EVSimpleHandlerFunc handler, void *client_data)
 
EVclient_sinks EVclient_register_raw_sink_handler (CManager cm, char *name, EVRawHandlerFunc handler, void *client_data)
 
int EVclient_source_active (EVsource src)
 
unsigned int EVclient_active_sink_count (EVclient client)
 
int EVmaster_assign_canonical_name (EVmaster master, char *given_name, char *canonical_name)
 
EVdfg EVdfg_create (EVmaster master)
 
EVdfg_stone EVdfg_create_stone (EVdfg dfg, char *action_spec)
 
void EVdfg_add_action (EVdfg_stone stone, char *action_spec)
 
EVdfg_stone EVdfg_create_source_stone (EVdfg dfg, char *source_name)
 
EVdfg_stone EVdfg_create_sink_stone (EVdfg dfg, char *handler_name)
 
void EVdfg_add_sink_action (EVdfg_stone stone, char *handler_name)
 
void EVdfg_link_port (EVdfg_stone source, int output_index, EVdfg_stone destination)
 
void EVdfg_link_dest (EVdfg_stone source, EVdfg_stone destination)
 
int EVdfg_unlink_port (EVdfg_stone source, int output_index)
 
int EVdfg_unlink_dest (EVdfg_stone source, EVdfg_stone destination)
 
int EVdfg_assign_node (EVdfg_stone stone, char *node)
 
void EVdfg_enable_auto_stone (EVdfg_stone stone, int period_sec, int period_usec)
 
void EVdfg_set_attr_list (EVdfg_stone stone, attr_list attrs)
 
attr_list EVdfg_get_attr_list (EVdfg_stone stone)
 
int EVclient_shutdown (EVclient client, int result)
 
int EVclient_force_shutdown (EVclient client, int result)
 
void EVclient_ready_for_shutdown (EVclient client)
 
int EVclient_wait_for_shutdown (EVclient client)
 
int EVclient_test_for_shutdown (EVclient client)
 

Detailed Description

Macro Definition Documentation

#define DFG_SOURCE   -1

Special StoneID used in EVcreate_submit_handle()

DFG_SOURCE is a special StoneID used in calls to EVcreate_submit_handle() to create EVsource handles that can be later assigned to DFG source nodes.

#define DFG_STATUS_SUCCESS   0

a value used in EVclient shutdown calls

DFG_STATUS_SUCCESS is a value used in EVclient_shutdown* calls

#define DFG_STATUS_FAILURE   1

a value used in EVclient shutdown calls

DFG_STATUS_FAILURE is a value used in EVclient_shutdown* calls

Typedef Documentation

typedef struct _EVdfg* EVdfg

EVdfg is a handle to a DFG.

EVdfg is an opaque handle

typedef struct _EVmaster* EVmaster

EVmaster is a handle to a DFG master, the distinguished process who creates the DFGs and manages clients.

EVmaster is an opaque handle

typedef struct _EVclient* EVclient

EVclient is a handle to a client process which can host DFG components.

EVclient is an opaque handle

typedef struct _EVdfg_stone* EVdfg_stone

EVdfg_stone is a handle to virtual EVpath stone.

EVdfg_stone is an opaque handle.

typedef struct _EVclient_sources* EVclient_sources

EVclient_sources is a handle to the set of client event source capabilities.

This opaque handle is returned by EVclient_register_source() and is then specified to EVclient_assoc() or EVclient_assoc_local(). It represents the capabilities of this client to host event source stones for any DFG that might be created.

typedef struct _EVclient_sinks* EVclient_sinks

EVclient_sources is a handle to the set of client event handler capabilities.

This opaque handle is returned by EVclient_register_sink_handler() or EVclient_register_raw_sink_handler() and is then specified to EVclient_assoc() or EVclient_assoc_local(). It represents the handlers available on this client for use by event sink stones for any DFG that might be created.

typedef void(* EVmasterJoinHandlerFunc)(EVmaster master, char *identifier, void *available_sources, void *available_sinks)

The prototype for an EVmaster client-join handling function.

In "dynamic join" mode, as opposed to static-client-list mode (See EVmaster_register_node_list()), the EVdfg master calls a registered join handler each time a new client node joins the DFG. This handler should 1) potentially assign a canonical name to the client node (using EVmaster_assign_canonical_name()), and 2) when the expected nodes have all joined the handler should create the virtual DFG and then call EVdfg_realize() in order to instantiate it.

This call happens in the Master process only.

Parameters
dfgThe EVdfg handle with which this handler is associated
identifierThis null-terminated string is the value specified in the corresponding EVclient_assoc() call by a client.
available_sourcesThis parameter is currently a placeholder for information about what sources the client is capable of hosting.
available_sinksThis parameter is currently a placeholder for information about what sinks the client is capable of hosting.
typedef void(* EVmasterFailHandlerFunc)(EVdfg dfg, char *failed_client, int failed_stone)

The prototype for an EVdfg client-fail handling function.

If the an EVmasterFailHandlerFunc has been registered to the DFG, this function will be called in the event that some node has failed. Generally EVdfg becomes aware that a node has failed when some other client tries to do a write to a bridge stone connected to that node and that write fails. Three things to be cognizant of:

  • This call happens in the Master process only.
  • If it's the Master that has failed, you're not going to get a call.
  • If multiple nodes notice the same failure, you might get multiple calls to this function resulting from a single failure.
Parameters
dfgThe EVdfg handle with which this handler is associated
failed_clientThis null-terminated string is the value that was specified in EVclient_assoc() in the failed client.
failed_stoneThis is local ID of the failed stone (perhaps not useful to anyone - should change or eliminate this).
typedef void(* EVmasterReconfigHandlerFunc)(EVdfg dfg)

The prototype for an EVdfg voluntary-reconfiguration handling function.

If the an EVmasterReconfigHandlerFunc has been registered to the DFG, this function will be called in the event that some stone has executed a call to EVdfg_trigger_reconfiguration() inside a CoD-based event handler. This allows a client application to monitor local conditions and to trigger action by the master in the event a reconfiguration is called for. The EVdfg_trigger_reconfiguration() call and the EVdfg_flush_attrs() call both cause local stone attributes to be flushed back to the Master's virtual stones so that they can be examined using EVdfg_get_attr_list().

Parameters
dfgThe EVdfg handle with which this handler is associated

Function Documentation

EVmaster EVmaster_create ( CManager  cm)

Create a DFG master

This call is used in master process to create a set of communicating EVdfg processes. The master is the unique point of control and adminstration for client processes and DFGs.

Parameters
cmThe CManager with which to associate the DFG
Returns
An EVmaster handle, to be used in later calls.
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
char* EVmaster_get_contact_list ( EVmaster  master)

Get the contact list from an EVmaster handle

This call is used to extract contact information from an EVmaster handle. This call is made on the Master side of EVdfg and the contact information is then provided to the remote Clients for use in EVclient_assoc() calls. The result of this call is a null-terminated string to be owned by the caller. (I.E. you should free the string memory when you're done with it.)

Parameters
masterThe EVmaster handle for which to create contact information.
Returns
A null-terminated string representing contact information for this EVdfg
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
EVclient EVclient_assoc ( CManager  cm,
char *  node_name,
char *  master_contact,
EVclient_sources  source_capabilities,
EVclient_sinks  sink_capabilities 
)

Associate this process as a client to an EVmaster

This call is used to join the set of communicating processes as a client. The master_contact string should be the same one that came from EVmaster_get_contact_list() on the master. This call cannot be used by the master process to participate in the DFG itself. In that circumstance, EVclient_assoc_local() should be used.

The source_capabilities and sink_capabilities parameters identify the set of sinks and sources that this client is capable of hosting. Those capabilities may or may not be utilized in the DFGs created by the master. All calls to register sinks and sources should be done before the EVclient_assoc() call.

Parameters
cmThe CManager with which to associate the DFG client
node_nameThe name with which the client can be identified. This should be unique among the joining nodes in static joining mode (I.E. using EVmaster_register_node_list(). In dynamic mode (I.E. where EVmaster_node_join_handler() is used), then this name is presented to the registered join handler, but it need not be unique. EVdfg copies this string, so it can be free'd after use.
master_contactThe string contact information for the master process. This is not stored by EVdfg.
source_capabilitiesThe last value returned by EVclient_register_source() or NULL
sink_capabilitiesThe last value returned by EVclient_register_sink_handle() or EVclient_register_raw_sink_handle, or NULL
Examples:
dfg_client.c, and dfg_client3.c.
EVclient EVclient_assoc_local ( CManager  cm,
char *  node_name,
EVmaster  master,
EVclient_sources  source_capabilities,
EVclient_sinks  sink_capabilities 
)

Associate a client to an EVmaster in the same process

This call is for the process which hosts the EVdfg master to also participate as an EVclient.

The source_capabilities and sink_capabilities parameters identify the set of sinks and sources that this client is capable of hosting. Those capabilities may or may not be utilized in the DFGs created by the master. All calls to register sinks and sources should be done before the EVclient_assoc() call.

Parameters
cmThe CManager with which to associate the DFG client
node_nameThe name with which the client can be identified. This should be unique among the joining nodes in static joining mode (I.E. using EVmaster_register_node_list(). In dynamic mode (I.E. where EVmaster_node_join_handler() is used), then this name is presented to the registered join handler, but it need not be unique. EVdfg copies this string, so it can be free'd after use.
masterThe handle for the EVmaster.
source_capabilitiesThe last value returned by EVclient_register_source() or NULL
sink_capabilitiesThe last value returned by EVclient_register_sink_handle() or EVclient_register_raw_sink_handle, or NULL
Returns
a handle to EVclient upon success
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
void EVmaster_register_node_list ( EVmaster  master,
char **  list 
)

Supply a static list of client names to the EVmaster.

This call is used in static joining mode, that is when the set of nodes that will join the DFG client set is known upfront and each has a predefined unique name.

Parameters
masterThe EVmaster handle for which the set of clients is to be specified.
listA NULL-terminated list of NULL-terminated strings. These names must be unique, and each must be used in an EVclient_assoc() or EVclient_assoc_local() call before the ensemble will be complete. EVdfg copies this list, so it should be free'd by the calling application if dynamic.
Examples:
dfg_master.c, dfg_master2.c, and dfg_master3.c.
void EVmaster_node_join_handler ( EVmaster  master,
EVmasterJoinHandlerFunc  func 
)

Register a node join handler function to an EVmaster.

Parameters
masterThe EVmaster handle with which to associate this handler
funcThe handler function to associate
Examples:
dfg_master4.c.
void EVmaster_node_fail_handler ( EVmaster  master,
EVmasterFailHandlerFunc  func 
)

Register a node fail handler function to an EVmaster

Parameters
masterThe EVmaster handle with which to associate this handler
funcThe handler function to associate
void EVmaster_node_reconfig_handler ( EVmaster  master,
EVmasterReconfigHandlerFunc  func 
)

Register a voluntary reconfiguration handler function to an EVmaster

Parameters
masterThe EVmaster handle with which to associate this handler
funcThe handler function to associate
void EVdfg_realize ( EVdfg  dfg)

Cause the instantiation of a virtual DFG.

This call is performed by the master to signal the end of the creation or reorganization of a DFG. In static-client-list mode, it is generally called by master after the virtual DFG has been created. In dynamic-join mode, creating the virtual DFG and calling EVdfg_realize() is how the join handler signals EVdfg that all expected nodes have joined. In a node fail handler, a node reconfig handler, or when the join handler is called after the first realization of the DFG, a further call of EVdfg_realize() represents the finalization of a reconfiguration of the DFG.

Parameters
dfgThe handle of the EVdfg to be realized.
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
int EVclient_ready_wait ( EVclient  client)

Wait for a DFG to be ready to run

This call is performed by participating clients (including the master process operating as a client), in order to wait for the deployment of a DFG. This call will only return after a DFG has been completely instantiated and is running. In initial deployment, all participating clients will exit this call at roughly the same time. In the case of client nodes that join after a DFG is already running, this call will return after the master has been notified of the join and the client has been incorporated into the DFG (I.E. stones potentially deployed.)

Parameters
clientThe EVclient handle upon which to wait.
Returns
1 on success, 0 on failure
Examples:
dfg_client.c, dfg_client3.c, dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
EVclient_sources EVclient_register_source ( char *  name,
EVsource  src 
)

Associate a name with a source handle

This call is performed by client nodes in order to register their ability to host a source with the given name. If the name appears in a virtual source stone that is mapped to the client, then that source handle is active.

Parameters
nameThe name to associate with the source handle. EVdfg does not take ownership of this string and the application should ensure that the string remains valid for the duration of EVdfg operation.
srcThe EVsource to be associated with the name. Source/name association is actually an EVPath-level operation, so there is no EVdfg parameter in this call.
Returns
The last value returned by EVclient_register_source() should be passed to EVclient_assoc() or EVclient_assoc_local(). Prior return values can be ignored.
Examples:
dfg_client.c, dfg_client3.c, dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
EVclient_sinks EVclient_register_sink_handler ( CManager  cm,
char *  name,
FMStructDescList  list,
EVSimpleHandlerFunc  handler,
void *  client_data 
)

Associate a name with a sink handle

This call is performed by client nodes in order to register their ability to host a sink stone with a handler with the given name.

Parameters
cmThe client's CManager
nameThe name to associate with the sink handle. EVdfg does not take ownership of this string and the application should ensure that the string remains valid for the duration of EVdfg operation.
listThe FMStructDescList describing the data that this handler function expects. EVdfg does not take ownership of this data structure and the application should ensure that the structure remains valid for the duration of EVdfg operation.
handlerThe EVSimpleHandlerFunc to be associated with the name/data type. Sink-handle/name association is actually an EVPath-level operation, so there is a CM parameter in this call, but no EVdfg param.
client_dataAn uninterpreted value that is passed to the handler function when it is called.
Returns
The last value returned by EVclient_register_sink_handler() or EVclient_register_raw_sink_handler(), should be passed to EVclient_assoc() or EVclient_assoc_local(). Prior return values can be ignored.
Examples:
dfg_client.c, dfg_client3.c, dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
EVclient_sinks EVclient_register_raw_sink_handler ( CManager  cm,
char *  name,
EVRawHandlerFunc  handler,
void *  client_data 
)

Associate a name with a raw sink handle

This call is performed by client nodes in order to register their ability to host a sink stone with a raw handler with the given name.

Parameters
cmThe client's CManager
nameThe name to associate with the sink handle. EVdfg does not take ownership of this string and the application should ensure that the string remains valid for the duration of EVdfg operation.
handlerThe EVRawHandlerFunc to be associated with the name/data type. Sink-handle/name association is actually an EVPath-level operation, so there is a CM parameter in this call, but no EVdfg param.
client_dataAn uninterpreted value that is passed to the handler function when it is called.
Returns
The last value returned by EVclient_register_sink_handler() or EVclient_register_raw_sink_handler(), should be passed to EVclient_assoc() or EVclient_assoc_local(). Prior return values can be ignored.
int EVclient_source_active ( EVsource  src)

return a boolean describing whether the source has been assigned in EVdfg

This call is performed by client nodes in order to determine if a particular local EVsource registered with EVdfg has actually been made active by having a virtual source stone associated with it.

Parameters
srcThe source to test
Returns
true if the source has been assigned, false otherwise
Examples:
dfg_client.c, dfg_client3.c, dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
unsigned int EVclient_active_sink_count ( EVclient  client)

return a count of EVdfg sink stones assigned to the current client

This call is performed by client nodes in order to determine how many sink stones have been assigned to them.

Parameters
clientThe EVclient under consideration.
Returns
the number of active sink stones assigned to the current client
Examples:
dfg_client3.c, dfg_master3.c, and dfg_master4.c.
int EVmaster_assign_canonical_name ( EVmaster  master,
char *  given_name,
char *  canonical_name 
)

Assign a unique, canonical name to a client of a particular given_name.

This call is performed by the master, typically in the EVmasterJoinHandlerFunc, in order to assign a unique name to clients who may not have one previously. The canonical name is the name to be used in EVdfg_assign_node(). The only constraint on the name is that not have been assigned to any already-participating node.

Parameters
masterThe master the client is joining.
given_nameThe original name of the client.
canonical_nameThe canonical name to be assigned to the client.
Returns
true on success, false if the name was not unique
Examples:
dfg_master4.c.
EVdfg EVdfg_create ( EVmaster  master)

Create a DFG

This call is used in the master process to create a DFG that will be deployed on the client processes.

Parameters
masterThe EVmaster with which to associate the DFG
Returns
An EVdfg handle, to be used in later calls.
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
EVdfg_stone EVdfg_create_stone ( EVdfg  dfg,
char *  action_spec 
)

Create an EVdfg stone with a specific action associated with it.

This call is performed by the master during the Stone Creation and Assignment process in order to create an EVdfg_stone.

Parameters
dfgThe DFG under consideration.
action_specAn action specifier string such as is created by the EVpath create_*_action_spec() routines. This parameter may be NULL if no action is to be initially assigned to the stone. If non-NULL, EVdfg takes ownership of the action_spec string and will free it upon DFG termination.
Returns
Function returns an EVdfg_stone handle that can be used in subsequent calls.
Examples:
dfg_master2.c, dfg_master3.c, and dfg_master4.c.
void EVdfg_add_action ( EVdfg_stone  stone,
char *  action_spec 
)

Add an action to an existing EVdfg stone.

This call is performed by the master during the Stone Creation and Assignment process in order to add an action to an EVdfg_stone.

Parameters
stoneThe EVdfg_stone to which to add the action.
action_specAn action specifier string such as is created by the EVpath create_*_action_spec() routines. EVdfg takes ownership of the action_spec string and will free it upon DFG termination.
EVdfg_stone EVdfg_create_source_stone ( EVdfg  dfg,
char *  source_name 
)

Create an EVdfg stone that will act as an Event source.

This call is performed by the master during the Stone Creation and Assignment process in order to create an EVdfg source stone. No other actions should be assigned to an EVdfg source stone.

Parameters
dfgThe DFG under consideration.
source_nameThis value must match some value which has been specified in EVclient_register_source() on the node to which this stone is eventually mapped. (EVdfg can't detect a mismatch until EVdfg_realize() is called.) The source_name string is not owned by EVdfg and should be free'd by the application if dynamic.
Returns
Function returns an EVdfg_stone handle that can be used in subsequent calls.
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
EVdfg_stone EVdfg_create_sink_stone ( EVdfg  dfg,
char *  handler_name 
)

Create an EVdfg stone that will act as an Event sink (terminal stone).

This call is performed by the master during the Stone Creation and Assignment process in order to create an EVdfg sink stone.

Parameters
dfgThe DFG under consideration.
handler_nameThis value must match some value which has been specified in EVclient_register_sink_handler() on the node to which this stone is eventually mapped. (EVdfg can't detect a mismatch until EVdfg_realize() is called.) The handler_name string is not owned by EVdfg and should be free'd by the application if dynamic.
Returns
Function returns an EVdfg_stone handle that can be used in subsequent calls.
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
void EVdfg_add_sink_action ( EVdfg_stone  stone,
char *  handler_name 
)

Add a sink action to an existing EVdfg stone.

This call is performed by the master during the Stone Creation and Assignment process in order to add a sink (terminal) action to an EVdfg stone.

Parameters
stoneThe EVdfg_stone to which to add the sink action.
handler_nameThis value must match some value which has been specified in EVclient_register_sink_handler() on the node to which this stone is eventually mapped. (EVdfg can't detect a mismatch until EVdfg_realize() is called.) The handler_name string is not owned by EVdfg and should be free'd by the application if dynamic.
void EVdfg_link_port ( EVdfg_stone  source,
int  output_index,
EVdfg_stone  destination 
)

Link a particular output port of one stone (the source) to a destination (target) stone.

This function is roughly the analog of the EVstone_set_output function, but at the EVdfg level. All non-terminal stones have one or more output ports from which data will emerge. EVdfg_link_port() is used to assign each of these outputs to another EVdfg_stone stone. For EVPath actions which have a single output, such as 'filter' and 'transform', those outputs appear on 'port_index' 0. Other actions, such as router and multityped actions allow submission to any port, so care must be taken that the code in those actions uses appropriate port numbers as assigned here. The complement of EVdfg_link_port() is EVdfg_unlink_port(). EVdfg source stones, and stones with no assigned actions, act as EVPath 'split' stones and their outputs are best managed with EVdfg_link_dest() and EVdfg_unlink_dest().

Parameters
sourceThe EVdfg_stone whose ports are to be assigned.
output_indexThe zero-based index of the output which should be assigned.
destinationThe EVdfg_stone which is to receive those events.
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
void EVdfg_link_dest ( EVdfg_stone  source,
EVdfg_stone  destination 
)

Link an anonymous output port of one stone (the source) to a destination (target) stone.

This function is roughly the analog of the EVstone_add_split_target, but at the EVdfg level. EVdfg stones with no additional actions associated with them are implicitly EVPath split stones and events presented to their inputs are replicated to all outputs. Those outputs can be maintained by their explicit numbers (with EVdfg_link_port()), or, since the specific output port to which a target stone is assigned is unimportant, the EVdfg_link_dest() call will simply assign the target stone to the next available port. The complement to this call is EVdfg_unlink_dest().

Parameters
sourceThe EVdfg_stone whose ports are to be assigned.
destinationThe EVdfg_stone which is to receive those events.
int EVdfg_unlink_port ( EVdfg_stone  source,
int  output_index 
)

Unlink a particular output port of one stone (the source).

The output port should have been previously set with EVdfg_link_port.

Parameters
sourceThe EVdfg_stone whose ports are to be assigned.
output_indexThe zero-based index of the output which should be assigned.
Returns
returns true on success, false if the particular port was not previously set
int EVdfg_unlink_dest ( EVdfg_stone  source,
EVdfg_stone  destination 
)

Unlink the output port of one stone (the source) so that it no longer directs events to a particular destination (target) stone.

Parameters
sourceThe EVdfg_stone whose ports are to be assigned.
destinationThe EVdfg_stone which should no longer receive those events.
Returns
returns true on success, false if the destination stone was not found on the output links of the source
int EVdfg_assign_node ( EVdfg_stone  stone,
char *  node 
)

Assign a particular EVdfg_stone to a particular client node.

This function assigns a particular EVdfg_stone to be instantiated upon a particular client node. The node parameter must match either 1) a string specified in EVmaster_register_node_list() (in static joining mode), or 2) a canonical name that has been assigned to a node (in dynamic joining mode).

Parameters
stoneThe EVdfg_stone to be assigned to a particular node.
nodeThe node to which it is to be assigned. EVdfg does not take ownership of this string and it should be free'd by the application if dynamic.
Returns
returns true on success, false if the node name given was not found in the set of nodes.
Examples:
dfg_master.c, dfg_master2.c, dfg_master3.c, and dfg_master4.c.
void EVdfg_enable_auto_stone ( EVdfg_stone  stone,
int  period_sec,
int  period_usec 
)

Set virtual stone properties to enable periodic auto-submits of NULL events on an EVdfg_stone. This becomes active upon DFG realization and activation.

This function is the analog of the EVenable_auto_stone() function, but at the EVdfg level.

Parameters
stoneThe EVdfg_stone which should receive auto-submits.
period_secThe period at which submits should occur, seconds portion.
period_usecThe period at which submits should occur, microseconds portion.

Autosubmits are initiated on each node just as it is about to return from EVclient_ready_wait(), I.E. with DFG activation.

void EVdfg_set_attr_list ( EVdfg_stone  stone,
attr_list  attrs 
)

Set the attribute list that will be visible as "stone_attrs" inside EVdfg dynamic functions.

Parameters
stoneThe EVdfg_stone affected.
attrsThe attribute list to be assigned. EVdfg does an add_ref_attr_list() on this list. Because lists are only free'd when the reference count goes to zero, the application should generally call free_attr_list() on the list as well.
attr_list EVdfg_get_attr_list ( EVdfg_stone  stone)

Query the attribute list that is/was visible as "stone_attrs" inside EVdfg dynamic functions.

Parameters
stoneThe EVdfg_stone involved.
Returns
The "stone_attrs" attribute list. EVdfg does an add_ref_attr_list() on this list before returning it. Because lists are only free'd when the reference count goes to zero, the application should generally call free_attr_list() when it is finished with it. Unless dynamic reconfiguration is in play, the stone_attrs value reported here does not reflect updates from the instantiated stones on the client nodes (even if local to the master). However, for voluntary reconfiguration, instance stone attributes are flushed to the master and can be interrogated with this call.
int EVclient_shutdown ( EVclient  client,
int  result 
)

Vote that this node is ready for shutdown, provide it's contribution to the return value and wait for the actual shutdown to occur.

One of EVclient_shutdown() or EVclient_ready_for_shutdown() should be called by every participating node for normal shutdown. The return value from all calls (on all nodes) to EVclient_shutdown() and EVclient_wait_for_shutdown() will all be the same.

Parameters
clientThe EVclient handle to which a return value is contributed
resultthis node's contribution to the DFG-wide shutdown value. In order to facilitate this value being passed directly to exit(), the convention for DFG exit values follows the Unix process exit semantics where 0 indicates success and non-zero indicates failure. In particular, the value provided should be either DFG_STATUS_SUCCESS (0) or DFG_STATUS_FAILURE (1)
Returns
the DFG-wide shutdown value
Examples:
dfg_client3.c, dfg_master3.c, and dfg_master4.c.
int EVclient_force_shutdown ( EVclient  client,
int  result 
)

Override voting and force shutdown with specific return value.

One of EVclient_shutdown() or EVclient_ready_for_shutdown() should be called by every participating node for normal shutdown. However, this call forces an abnormal shutdown. The return value from all calls (on all nodes) to EVclient_shutdown() and EVclient_wait_for_shutdown() will all the value of this result parameter.

Parameters
clientThe EVclient handle for which shutdown should be forced
resultthis node's contribution to the DFG-wide shutdown value. In order to facilitate this value being passed directly to exit(), the convention for DFG exit values follows the Unix process exit semantics where 0 indicates success and non-zero indicates failure. In particular, the value provided should be either DFG_STATUS_SUCCESS (0) or DFG_STATUS_FAILURE (1)
Returns
the DFG-wide shutdown value (actually equal to result here)
void EVclient_ready_for_shutdown ( EVclient  client)

Vote that this node is ready for shutdown and is providing no specific contribution to the return value.

One of EVclient_shutdown() or EVclient_ready_for_shutdown() should be called by every participating node for normal shutdown. The return value from EVclient_wait_for_shutdown() will be the same on each node and will depend upon every node's contribution to the shutdown status.

Parameters
clientThe EVclient handle for which shutdown is indicated.
Examples:
dfg_client3.c, dfg_master3.c, and dfg_master4.c.
int EVclient_wait_for_shutdown ( EVclient  client)

Wait for EVdfg to determine that the coordinated shutdown time has arrived.

One of EVclient_shutdown() or EVclient_ready_for_shutdown() should be called by every participating node for normal shutdown. The return value from EVclient_wait_for_shutdown() will be the same on each node and will depend upon every node's contribution to the shutdown status.

Parameters
clientThe EVclient handle for which shutdown is indicated.
Returns
the DFG-wide shutdown value. In order to facilitate this value being passed directly to exit(), the convention for DFG exit values follows the Unix process exit semantics where 0 indicates success and non-zero indicates failure. In particular, the value returned here should be either DFG_STATUS_SUCCESS (0) or DFG_STATUS_FAILURE (1)
Examples:
dfg_client3.c, dfg_master3.c, and dfg_master4.c.
int EVclient_test_for_shutdown ( EVclient  client)

test to see if the coordinated shutdown time has arrived.

This call essentially tests to see if EVclient_wait_for_shutdown() will return immediately. If false, EVclient_wait_for_shutdown() would block as the coordinated shutdown time has not yet arrived. Clients using this call must still use EVclient_wait_for_shutdown() to exit cleanly.

Parameters
clientThe EVclient handle for which shutdown may be imminent
Returns
boolean True if the DFG-wide shutdown time has arrived