Data
Data describes one parsed record in a Batcher super-frame, including
payload iterator range and per-record metadata (destination and user bytes).
It is produced by CoreV1/CoreV2 and consumed by SplitterV1/SplitterV2.
Data objects in C++ are referenced by the following shared pointer typedef:
The class description is shown below:
-
class Data
Parsed batcher record descriptor.
Datarepresents one record extracted from a batcher super-frame byCoreV1orCoreV2. It stores:Iterators delimiting the payload bytes in the original frame.
Per-record routing/control fields (
dest,fUser,lUser).
SplitterV1andSplitterV2consumeDataobjects fromCoreV1/CoreV2to build and emit individual output frames.Protocol references:
Batcher v1: https://confluence.slac.stanford.edu/x/th1SDg
Batcher v2: https://confluence.slac.stanford.edu/x/L2VlK
Public Functions
-
Data(rogue::interfaces::stream::FrameIterator it, uint32_t size, uint8_t dest, uint8_t fUser, uint8_t lUser)
Constructs a parsed record descriptor.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
it – Iterator to beginning of record payload.
size – Record payload size in bytes.
dest – Destination/channel field.
fUser – First-user metadata byte.
lUser – Last-user metadata byte.
-
~Data()
Destroys the record descriptor.
-
rogue::interfaces::stream::FrameIterator begin()
Returns iterator to beginning of payload.
- Returns:
Payload-begin iterator.
-
rogue::interfaces::stream::FrameIterator end()
Returns iterator to end of payload.
- Returns:
Payload-end iterator.
-
uint32_t size()
Returns payload size.
- Returns:
Payload size in bytes.
-
uint8_t dest()
Returns destination/channel value.
- Returns:
Destination/channel field.
-
uint8_t fUser()
Returns first-user metadata.
- Returns:
First-user byte.
-
uint8_t lUser()
Returns last-user metadata.
- Returns:
Last-user byte.
Public Static Functions
-
static void setup_python()
Registers Python bindings for this class.
-
static std::shared_ptr<rogue::protocols::batcher::Data> create(rogue::interfaces::stream::FrameIterator it, uint32_t size, uint8_t dest, uint8_t fUser, uint8_t lUser)
Creates a parsed record descriptor.
Parameter semantics are identical to the constructor; see
Data()for construction-path details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.- Parameters:
it – Iterator to beginning of record payload.
size – Record payload size in bytes.
dest – Destination/channel field.
fUser – First-user metadata byte.
lUser – Last-user metadata byte.
- Returns:
Shared pointer to the created record descriptor.