Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 1.88 KB

File metadata and controls

50 lines (31 loc) · 1.88 KB

SHM Modbus - Shared Memory Dump

The dump-shm application is designed to output the content of a shared memory to its standard output. It provides options to specify the shared memory name, limit the number of bytes to output and adjust the offset. In addition the shared memory access can be protected against simultaneous access with an existing named semaphore.

Usage

dump-shm [OPTION...] SHM_NAME

Options:

  • -b, --bytes: Limits the number of bytes to output.
  • -o, --offset: Specifies the number of bytes to skip.
  • -s, --semaphore: Enables protection of the shared memory with an existing named semaphore to prevent simultaneous access.

Example

dump-shm -b 64 -o 32 -s my_sem my_shm

This example will dump the content of the shared memory named "my_shm" to the standard output, starting from the 33rd byte (skipping the first 32 bytes), and outputting a maximum of 64 bytes while ensuring exclusive access to the shared memory using the semaphore "my_sem".

Install

Using the Arch User Repository (recommended for Arch based Linux distributions)

The application is available as dump-shm in the Arch User Repository. See the Arch Wiki for information about how to install AUR packages.

Using the Modbus Collection Package: SHM Modbus

SHM Modbus is a collection of multiple tools to simulate a Modbus client.

Flatpak

The Flatpak package is available via Flathub as io.github.shmmodbus.shm-modbus.

dump-shm is invoked by executing the following command:

flatpak run io.github.shmmodbus.shm-modbus dump-shm