Falcon
Loading...
Searching...
No Matches

Public Member Functions

virtual void ClearData ()
 ClearData class is called each time a data packet is claimed on the output port.
uint64_t serial_number () const
void set_serial_number (uint64_t n)
int64_t ingestion_tsc () const
 This timestamp is set when the data packet is first ingested by Falcon.
void set_ingestion_tsc ()
 Set the ingestion timestamp to now. This should only be called by a "source" processor when the data packet is first ingested.
void forward_ingestion_tsc (const Data &data)
 Forward the ingestion timestamp from an upstream data packet to this data packet.
void set_source_timestamp ()
 set_source_timestamp set the timepoint based on the internal Falcon clock.
void set_source_timestamp (TimePoint t)
 set_source_timestamp set a given timepoint.
TimePoint source_timestamp () const
 source_timestamp getter for the source_timestamp_. This timestamp is set by the internal Falcon clock.
template<typename DURATION = std::chrono::microseconds>
DURATION time_passed () const
template<typename DURATION = std::chrono::microseconds>
DURATION time_since (TimePoint reference) const
uint64_t hardware_timestamp () const
 hardware_timestamp timestamp given by the hardware. The unit depends on the hardware.
void set_hardware_timestamp (uint64_t t)
void CloneTimestamps (const Data &data)
 CloneTimestamps - copy timestamps from one packet to the other.
virtual void SerializeBinary (std::ostream &stream, Serialization::Format format) const
 SerializeBinary - Serialize data specific for the data type in binary form according to the layout described in YAMLDescription. At this level, only serialize the source timestamp, hardware timestamp and serial number.
virtual std::string_view serialized_type_name () const
 Identifies the underlying dynamic type for binary serialization.
virtual void SerializeYAML (YAML::Node &node, Serialization::Format format) const
 SerializeYAML - Serialize data specific for the data type in yaml form according to the layout described in YAMLDescription. At this level, only serialize the source timestamp duration, hardware timestamp and serial number.
virtual void YAMLDescription (YAML::Node &node, Serialization::Format format) const
 YAMLDescription - Add the datatype metadata (list of data with type and size) to the header used for yaml and binary serialization.
virtual void SerializeFlatBuffer (flexbuffers::Builder &flex_builder)
 SerializeFlatBuffer - Serialize with a flexbuffer the data specific for each datatype.
Public Member Functions inherited from IData< Data, BaseType >
virtual std::string datatype () const
virtual std::string dataname () const

Static Public Member Functions

static const std::string static_datatype ()
 datatype
static const std::string static_dataname ()
 dataname

Protected Attributes

int64_t ingestion_tsc_
 CPU timestamp counter when the data packet was first ingested by Falcon.
TimePoint source_timestamp_
uint64_t hardware_timestamp_
uint64_t serial_number_

Additional Inherited Members

Public Types inherited from IData< Data, BaseType >
using Base

Member Function Documentation

◆ CloneTimestamps()

void Data::CloneTimestamps ( const Data & data)

CloneTimestamps - copy timestamps from one packet to the other.

Parameters
data

◆ hardware_timestamp()

uint64_t Data::hardware_timestamp ( ) const

hardware_timestamp timestamp given by the hardware. The unit depends on the hardware.

Returns

◆ ingestion_tsc()

int64_t Data::ingestion_tsc ( ) const

This timestamp is set when the data packet is first ingested by Falcon.

Returns
int64_t

◆ SerializeBinary()

void Data::SerializeBinary ( std::ostream & stream,
Serialization::Format format ) const
virtual

SerializeBinary - Serialize data specific for the data type in binary form according to the layout described in YAMLDescription. At this level, only serialize the source timestamp, hardware timestamp and serial number.

Parameters
streambinary stream where to add the data
formatCompact or Full

◆ serialized_type_name()

virtual std::string_view nsAnyType::Data::serialized_type_name ( ) const
inlinevirtual

Identifies the underlying dynamic type for binary serialization.

Returns
String view of the class or payload type name.

◆ SerializeFlatBuffer()

void Data::SerializeFlatBuffer ( flexbuffers::Builder & flex_builder)
virtual

SerializeFlatBuffer - Serialize with a flexbuffer the data specific for each datatype.

At this level add the source timestamp duration, hardware timestamp and serial number format description.

Parameters
flex_builderflexbuffer builder

◆ SerializeYAML()

void Data::SerializeYAML ( YAML::Node & node,
Serialization::Format format ) const
virtual

SerializeYAML - Serialize data specific for the data type in yaml form according to the layout described in YAMLDescription. At this level, only serialize the source timestamp duration, hardware timestamp and serial number.

Parameters
nodeyaml node where to add the data
formatcompact or full

◆ set_source_timestamp()

void Data::set_source_timestamp ( TimePoint t)

set_source_timestamp set a given timepoint.

Parameters
t

◆ source_timestamp()

TimePoint Data::source_timestamp ( ) const

source_timestamp getter for the source_timestamp_. This timestamp is set by the internal Falcon clock.

Returns
TimePoint

◆ static_dataname()

const std::string nsAnyType::Data::static_dataname ( )
inlinestatic

dataname

Returns
label for the data

◆ static_datatype()

const std::string nsAnyType::Data::static_datatype ( )
inlinestatic

datatype

Returns
name of the datatype

◆ time_passed()

template<typename DURATION = std::chrono::microseconds>
DURATION nsAnyType::Data::time_passed ( ) const
inline

Compute the duration since the timestamp has been set. The default unit is in microseconds but can be changed based on the template.

◆ time_since()

template<typename DURATION = std::chrono::microseconds>
DURATION nsAnyType::Data::time_since ( TimePoint reference) const
inline

Compute the duration since the given reference. The default unit is in microseconds but can be changed based on the template.

Parameters
referenceselected timepoint

◆ YAMLDescription()

void Data::YAMLDescription ( YAML::Node & node,
Serialization::Format format ) const
virtual

YAMLDescription - Add the datatype metadata (list of data with type and size) to the header used for yaml and binary serialization.

At this level add the source timestamp duration, hardware timestamp and serial number format description.

Parameters
node- data node where to add a list of data element with the type and the size
formatcompact or full

The documentation for this class was generated from the following files: