cnet v4.0.4  

home topology files command‑line options the core API FAQ download and install

cnet's Application Programming Interface

NAME
CNET_get_mapscale - get the scale of the simulation map

SYNOPSIS
#include <cnet.h> double CNET_get_mapscale(void);

DESCRIPTION
Simulations run within a rectangular region, the map, whose dimensions are set in the toplology file with the attributes mapwidth and mapheight. In addition, items such as nodes and links that are drawn on the map are scaled by the global attribute mapscale, which indicates how many real-world metres are represented by one pixel on the simulation's map.

The map's scale will not change during a simulation, and so CNET_get_mapscale only needs to be called once.

RETURN VALUE
The scale of the simulation map is returned. The function cannot fail.

SEE ALSO
CNET_get_position and CNET_set_position.

cnet v4.0.4 - [email protected]