Communicating with Statistics
Because packets can store general user-specified information, they can always be used to support the communication of data between processes. However, for certain types of applications that communicate small amounts of information and which do not require the structure provided by a packet format, a packet interface may be overly complex.
One such application is the communication of one numerical value between modules. To accomplish this using packets as the communication vehicle, several steps are required each time a new value is transferred:
- A packet is created.
- The new value is placed in a packet field.
- The packet is sent to the destination using a stream or packet delivery.
- The packet is obtained by the destination module.
- The field’s value is extracted by the destination module.
Because transfer of individual numerical values is commonly performed between modules, Modeler provides a simpler interface specifically for this purpose. The interface is supported by a node domain object called a statistic wire, and the communicated values are referred to as statistics.
This section includes the following topics: