libtcspc.ViewAsBytes

final class libtcspc.ViewAsBytes(event_type)[source]

Bases: Node

Processor that emits the in-memory bytes of bucketed events.

For each incoming BucketEvent of event_type, the underlying storage is viewed (without copying) as a BucketEvent of bytes and emitted.

Parameters:

event_type (EventType) – Element type of the input buckets. Must be trivially-typed.

Notes

Events handled:

  • BucketEvent of event_type: emit its storage as BucketEvent of bytes (no copy).

  • All other event types: rejected at graph build time.

  • End of input: pass through.

See also

tcspc::view_as_bytes()

The underlying C++ factory function.

BatchFromBytes

Copy batches of bytes into batches of typed events.