https://github.com/slaclab/pysmurf
https://github.com/slaclab/pysmurf
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/slaclab/pysmurf
- Owner: slaclab
- License: other
- Created: 2019-02-28T18:56:07.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-04-03T19:05:38.000Z (about 1 year ago)
- Last Synced: 2025-04-03T20:21:29.783Z (about 1 year ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 55.8 MB
- Stars: 2
- Watchers: 15
- Forks: 11
- Open Issues: 156
-
Metadata Files:
- Readme: README.CustomDataTransmitter.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Data Custom Transmitter
The SMuRF processor pipeline has a placeholder to insert a user-defined processing block which will take the processed data packet and send them to a third party system.
A base C++ class called [BaseTransmitter](include/smurf/core/transmitters/BaseTransmitter.h) is provided. The user code should write a derivate class from this base class.
The base class contains two virtual methods:
- `dataTransmit`: This method is called when a new processed data packet is available. An object of type `SmurfPacketROPtr` is passed as an argument to this method; this object is an (smart) pointer to a [SmurfPacket class](include/smurf/core/common/SmurfPacket.h) object, which will give RO access to the content of the SMuRF packet (see [here](README.SmurfPacket.md) for details).
- `metaTransmit`: This method is called when a new frame with metadata is available. The metadata is passed as a `std::string` object to this method.
An example on how to write a custom data transmitter and use it with the pysmurf server is available in the [pysmurf-custom-transmitter-example](https://github.com/slaclab/pysmurf-custom-transmitter-example) git repository.