Metric: Fan In

User Description

The Fan In metric is used to get information about how many incoming dependencies (reads, writes, calls, and so on) to a node in the analysis data model (Dependency Model) are available. Incoming dependency means, that for example, a node is called and another node depends on this node.

Metric Calculation

Each incoming dependency is considered for a node. A node can be a function block, program, function, variable, library, property, method, task, and so on.

Example

Dependency example (list of dependencies):

FunctionBlockA defines MethodA
FunctionBlockA defines MethodB
FunctionBlockA defines VariableC
FunctionBlockA calls MethodA
MethodA calls MethodB
MethodB reads VariableC

Fan In Results

Fan In (FunctionBlockA) = 0
Fan In (MethodA) = 2
Fan In (MethodB) = 2
Fan In (VariableC) = 2