ark::pipeline::AbstractEnvelope

Defined in header “ark/pipeline/envelope.hh”.


This is the base envelope class, which allows you to work with envelopes without knowing their type.

Typedefs

  • using TimeType = std::chrono::steady_clock::time_point
    Defines the type of timestamp envelopes measure things in.

Methods

  • ~AbstractEnvelope()
    Virtual destructor, for cleanup.

  • const TimeType & publish_time()
    Returns the time that this object was published.

  • uint64_t publisher_sequence_number()
    Returns the sequence number of this message with respect to messages published from a single publisher. In other words, if publisher ID is identical between envelopes, you should see this number increment monotnically.

  • uint64_t publisher_identifier()
    Returns the identifier of the publisher that constructed this envelope. You should not depend on this value to be unique or consistent across executions.

  • serialization::JsonBlob to_json()
    Deserializes the internal type as a JSON.

  • core::ByteBuffer to_bytes()
    Deserializes the internal type as a byte buffer, using binary serialization.

  • const std::type_info & message_type()
    Returns type identification information about the payload inside this envelope.

  • std::string message_type_name()
    Returns a string-form of the type identification information about the payload inside the envelope. This should be treated as human-readable information (in other words, it might be demangled C++, or it might be rbuf message type names).

  • bool is_serializable()
    Returns true if the type that this envelopes contains identifies as being serializable.