blockSharedMemoryRead
A block for reading data out of shared memory buffers
Extends from Modelica_DeviceDrivers.Utilities.Icons.BaseIcon (Base icon for blocks providing access to external devices), Modelica_DeviceDrivers.Utilities.Icons.SharedMemoryIcon (Base icon for shared memory blocks), Modelica_DeviceDrivers.Blocks.Communication.Internal.PartialSampleTrigger (Common code for triggering calls to external I/O devices).
Information
Supports reading from a named shared memory partition. The name of the shared memory partition is provided by the parameter memoryID. If the shared memory partition does not yet exist during initialization, it is created.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Activation | |||
| Boolean | enableExternalTrigger (from PartialSampleTrigger) | false | true, enable external trigger input signal, otherwise use sample time settings below |
| SI.Period | sampleTime (from PartialSampleTrigger) | 0.1 | Sample period of component |
| SI.Time | startTime (from PartialSampleTrigger) | 0 | First sample time instant |
| Shared memory partition | |||
| Boolean | autoBufferSize | false | true, buffer size is deduced automatically, otherwise set it manually |
| Integer | userBufferSize | 16*1024 | Buffer size of shared memory partition in bytes (if not deduced automatically) |
| String | memoryID | "sharedMemory" | ID of the shared memory buffer |
| Boolean | cleanup | true | true, unlink shared memory at process termination, otherwise no unlink ⇒ 'memoryID' can still be opened (Linux specific, otherwise no effect) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.BooleanInput | trigger (from PartialSampleTrigger) | ||
| Interfaces.PackageOut | pkgOut |