Skip to content

iceoryx_dds/dds/data_writer.hpp🔗

Namespaces🔗

Name
iox
iox::dds

Classes🔗

Name
class iox::dds::DataWriter
Abstraction for DDS Data Writers.

Source code🔗

// Copyright (c) 2020 - 2021 by Robert Bosch GmbH. All rights reserved.
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_DDS_DDS_DATA_WRITER_HPP
#define IOX_DDS_DDS_DATA_WRITER_HPP

#include "iceoryx_dds/dds/iox_chunk_datagram_header.hpp"

#include "iceoryx_posh/iceoryx_posh_types.hpp"

#include <cstdint>

namespace iox
{
namespace dds
{
class DataWriter
{
  public:
    virtual ~DataWriter() = default;

    virtual void connect() noexcept = 0;

    virtual void write(iox::dds::IoxChunkDatagramHeader datagramHeader,
                       const uint8_t* const userHeaderBytes,
                       const uint8_t* const userPayloadBytes) noexcept = 0;

    virtual capro::IdString_t getServiceId() const noexcept = 0;

    virtual capro::IdString_t getInstanceId() const noexcept = 0;

    virtual capro::IdString_t getEventId() const noexcept = 0;

  protected:
    DataWriter() = default;
};

} // namespace dds
} // namespace iox

#endif // IOX_DDS_DDS_DATA_WRITER_HPP

Updated on 18 December 2023 at 13:11:43 CET