modelPackager

Create a package which allows to add signals of various types
Diagram of Packager

Information

The Packager block creates a packager object to which payload can be added by subsequent blocks.

Advanced parameter settings

With the default parameter settings the buffer size (size of the serialized package), as well as the sample time of the block is determined automatically by backward propagation. However, that values may also be set manually. An example there this functionality is used is the TestSerialPackager model. In that model the parameter sampleTime is explicitly set, since backward propagation is not possible in that case.

Examples

The block is used in several examples, e.g. in, TestSerialPackager_UDP. The figure below shows an arrangement in which a Packager object is created and after that a payload of three Real values and one Integer value is added, serialized and finally sent using UDP.

Parameters

TypeNameDefaultDescription
Advanced › Activation
BooleanenableExternalTriggerfalsetrue, enable external trigger input signal, otherwise use sample time settings below
BooleanuseBackwardSampleTimePropagationtruetrue, use backward propagation for sample time, otherwise switch to forward propagation
Modelica.Units.SI.PeriodsampleTime0.01Sample time if forward propagation of sample time is used
Advanced › Buffer size settings
BooleanuseBackwardPropagatedBufferSizetruetrue, use backward propagated (automatic) buffer size for package, otherwise use manually specified buffer size below
IntegeruserBufferSize16*1024Buffer size for package if backward propagation of buffer size is deactivated

Connectors

TypeNameDefaultDescription
Interfaces.PackageOutpkgOut
Modelica.Blocks.Interfaces.BooleanInputtrigger