C-Code Function Visibility Control via Global View

Hide C-Code functions based on Function names

For know-how protection, C-Code functions can be specified as non-expandable for interactive models in EHANDBOOK-NAVIGATOR during EHANDBOOK Container generation.

To enable this feature, the command line option -globalViewFile (CB & UGG) that takes "path_to_jsonfile\name.json" as argument is used. The JSON file specifies the list of functions to be hidden, see sample below.

The functions "add" and "subtract" are made non-expandable.

{
	"CCode": {
		"hideContents": [
			{
				"name": {
					"exact": ["add","subtract"]
				}
			}
		]
	}
}

Example Output:

Example Output for CCode models with globalView configuration

A sample file is available in the examples sub folder of the EHB-CB installation directory. (..\examples\configuration\GlobalView.json)

  • This feature also works when functions are configured to be inlined in EHANDBOOK.

  • C-Code hierarchies which are not functions can also be specified as non-expandable using this feature.

Exclude C-Code Functions based on Function names

C-Code functions such as debug or logging functions like printf can be excluded from the interactive model by specifying their names in the Global View JSON file.

To enable this feature, the command-line option -globalViewFile (applicable to both CB and UGG) that takes "path_to_jsonfile\name.json" as argument should be used.

The JSON file specifies the list of functions to be excluded, as shown in the example below:

{
	"CCode": {
		"excludeFunctions": [
			{
				"name": "printf"
			},
			{
				"name": "logStatements"
			}
		]
	}
}

The Functions "printf" and "logStatements" are excluded from interactive model.

Example Output

Example Output for CCode models with globalView configuration of excluded functions

A sample file is provided in the examples subfolder of the EHB-CB installation directory: (..\examples\configuration\GlobalView.json)

When a function is excluded:

  • Its definition and all calls to it are removed from the model.

  • Only functions with a void return type are fully supported.

  • Excluding functions with return values may cause structural changes in the model.

This feature helps simplify the model by removing debug or helper functions that are not essential to the core logic.