PRINT_NET_LINK

The PRINT_NET_LINK function prints a hyperlink for a net in the test output, that enables the net to be visualised in the application.

Multiple nets can be linked to using PRINT_NETS_LINK. There is also an equivalent for the test details output: TEST_DETAILS_NET_LINK.

XJDeveloper and XJInvestigator

If an ODB++ netlist is available for the board, left clicking the hyperlink will launch Layout Viewer and show the net. If no ODB++ netlist is available left clicking the link will show the net in Explorer. Right clicking the link will present the following options - Open in Layout Viewer, Add to Selection in Layout Viewer, Open in Explorer and Show in Schematic Viewer.

XJRunner

Links will only be highlighted and clickable if ODB++ information is available for the board. In this case left clicking will launch Layout Viewer and show the net. Right clicking the link will present the following options - Open in Layout Viewer, Add to Selection in Layout Viewer and Show in Schematic Viewer.

XJRun command line

No formatting will be applied.

Syntax

PRINT_NET_LINK( STRING netName )
PRINT_NET_LINK( STRING text, STRING netName )

Parameters

text
Optional text to print for the link. If this argument is not given the text used will be the name of the net being linked to.
netName

A string identifying a net in the form 'board.net', e.g. a string returned from GET_NET_FROM_PIN. The board name is optional, but the net name must uniquely identify the net, so if there is any ambiguity then the board name must be supplied.

Errors

If the netName supplied does not contain a board name and matches more than one net, then an error occurs. If the expression is constant, the error will occur at compile-time. Otherwise, the error will occur at run-time, when the function is run.

Examples

CONST STRING constNetA := "NetCN2_1";
STRING varNetB := "XJDemo.NetCN2_3";

// Checked at compile time
PRINT_NET_LINK(constNetA); PRINT("\n");

// Checked at run time
PRINT_NET_LINK(varNetB); PRINT("\n");

// Guaranteed to be found with board qualifier
PRINT_NET_LINK("Board1.XTD0"); PRINT("\n");

// Linked nets should not have board qualifier
PRINT_NET_LINK("linkedNetsA"); PRINT("\n");

// Guaranteed to be found using GET_NET_FROM_PIN
PRINT_NET_LINK(GET_NET_FROM_PIN(DATA[0])); PRINT("\n");

// Text argument
PRINT_NET_LINK("This is a link to GND\n", "GND");

// Printed in the middle of a line of text
PRINT("Here is a link to "); PRINT_NET_LINK("DATA[7]", GET_NET_FROM_PIN(DATA[7])); PRINT(" in the middle of a sentence.\n");

Output

NetCN2_1
NetCN2_3
Board1.XTD0
linkedNetsA
D0
This is a link to GND
Here is a link to DATA[7] in the middle of a sentence.