Program Listing for File ITransport.h

Return to documentation for file (include/sick_safevisionary_base/ITransport.h)

// -- BEGIN LICENSE BLOCK ----------------------------------------------
// -- END LICENSE BLOCK ------------------------------------------------

#pragma once

#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

namespace visionary {

class ITransport
{
public:
  virtual ~ITransport(){}; // destructor, use it to call destructor of the inherit classes

  virtual int send(const std::vector<std::uint8_t>& buffer) = 0;

  virtual int recv(std::vector<std::uint8_t>& buffer, std::size_t maxBytesToReceive) = 0;

  virtual int read(std::vector<std::uint8_t>& buffer, std::size_t nBytesToReceive) = 0;
};

} // namespace visionary