forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16f96af
commit 1104481
Showing
19 changed files
with
1,044 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
third-party/realdds/include/realdds/topics/getcontrolvalue-request-msg.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2023-4 Intel Corporation. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include <realdds/dds-defines.h> | ||
#include <realdds/topics/ros2/ros2getcontrolvalue-request.h> | ||
|
||
#include <memory> | ||
|
||
namespace realdds | ||
{ | ||
namespace topics | ||
{ | ||
class GetControlValueRequestPubSubType; | ||
} // namespace msg | ||
} // namespace sensor_msgs | ||
|
||
namespace realdds | ||
{ | ||
|
||
class dds_participant; | ||
class dds_topic; | ||
class dds_topic_reader; | ||
|
||
namespace topics | ||
{ | ||
|
||
class GetControlValueRequestMsg | ||
{ | ||
public: | ||
using type = realdds::topics::GetControlValueRequestPubSubType; | ||
|
||
GetControlValueRequestMsg() = default; | ||
~GetControlValueRequestMsg() = default; | ||
|
||
uint64_t const get_control_id() const { return _data.get_control_id(); } | ||
void set_control_id(uint64_t new_control_id) { _data.set_control_id(new_control_id); } | ||
|
||
static std::shared_ptr<dds_topic> create_topic(std::shared_ptr<dds_participant> const &participant, | ||
char const *topic_name); | ||
|
||
|
||
private: | ||
realdds::topics::GetControlValueRequest _data; | ||
}; | ||
|
||
} // namespace topics | ||
} // namespace realdds |
49 changes: 49 additions & 0 deletions
49
third-party/realdds/include/realdds/topics/getcontrolvalue-response-msg.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2023-4 Intel Corporation. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include <realdds/dds-defines.h> | ||
#include <realdds/topics/ros2/ros2getcontrolvalue-response.h> | ||
|
||
#include <memory> | ||
|
||
namespace realdds | ||
{ | ||
namespace topics | ||
{ | ||
class GetControlValueResponsePubSubType; | ||
} // namespace msg | ||
} // namespace sensor_msgs | ||
|
||
namespace realdds | ||
{ | ||
|
||
class dds_participant; | ||
class dds_topic; | ||
class dds_topic_reader; | ||
|
||
namespace topics | ||
{ | ||
|
||
class GetControlValueResponseMsg | ||
{ | ||
public: | ||
using type = realdds::topics::GetControlValueResponsePubSubType; | ||
|
||
GetControlValueResponseMsg() = default; | ||
~GetControlValueResponseMsg() = default; | ||
|
||
long const get_result() const { return _data.get_result(); } | ||
void set_result(uint64_t new_result) { _data.set_result(new_result); } | ||
|
||
static std::shared_ptr<dds_topic> create_topic(std::shared_ptr<dds_participant> const &participant, | ||
char const *topic_name); | ||
|
||
|
||
private: | ||
realdds::topics::GetControlValueResponse _data; | ||
}; | ||
|
||
} // namespace topics | ||
} // namespace realdds |
120 changes: 120 additions & 0 deletions
120
third-party/realdds/include/realdds/topics/ros2/ros2getcontrolvalue-request.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2023-4 Intel Corporation. All Rights Reserved. | ||
|
||
#ifndef _GET_CONTROL_VALUE_REQSPONSE_H_ | ||
#define _GET_CONTROL_VALUE_REQSPONSE_H_ | ||
|
||
#include <fastrtps/utils/fixed_size_string.hpp> | ||
#include <stdint.h> | ||
|
||
#include <array> | ||
#include <string> | ||
#include <vector> | ||
#include <map> | ||
#include <bitset> | ||
|
||
#if defined(_WIN32) | ||
#if defined(EPROSIMA_USER_DLL_EXPORT) | ||
#define eProsima_user_DllExport __declspec(dllexport) | ||
#else | ||
#define eProsima_user_DllExport | ||
#endif // EPROSIMA_USER_DLL_EXPORT | ||
#else | ||
#define eProsima_user_DllExport | ||
#endif // _WIN32 | ||
|
||
#if defined(_WIN32) | ||
#if defined(EPROSIMA_USER_DLL_EXPORT) | ||
#if defined(GETCONTROLRESPONSE_SOURCE) | ||
#define GETCONTROLRESPONSE_DllAPI __declspec(dllexport) | ||
#else | ||
#define GETCONTROLRESPONSE_DllAPI __declspec(dllimport) | ||
#endif // | ||
#else | ||
#define GETCONTROLRESPONSE_DllAPI | ||
#endif // | ||
#else | ||
#define GETCONTROLRESPONSE_DllAPI | ||
#endif // _WIN32 | ||
|
||
namespace eprosima | ||
{ | ||
namespace fastcdr | ||
{ | ||
class Cdr; | ||
} // namespace fastcdr | ||
} // namespace eprosima | ||
|
||
namespace realdds | ||
{ | ||
namespace topics | ||
{ | ||
|
||
class GetControlValueRequest | ||
{ | ||
public: | ||
// Default constructor | ||
eProsima_user_DllExport GetControlValueRequest() = default; | ||
|
||
// Default constructor | ||
eProsima_user_DllExport ~GetControlValueRequest() = default; | ||
|
||
eProsima_user_DllExport static size_t getMaxCdrSerializedSize( | ||
size_t current_alignment = 0); | ||
|
||
/*! | ||
* @brief This function returns the serialized size of a data depending on the buffer alignment. | ||
* @param data Data which is calculated its serialized size. | ||
* @param current_alignment Buffer alignment. | ||
* @return Serialized size. | ||
*/ | ||
eProsima_user_DllExport static size_t getCdrSerializedSize( | ||
const realdds::topics::GetControlValueRequest &data, | ||
size_t current_alignment = 0); | ||
|
||
/*! | ||
* @brief This function serializes an object using CDR serialization. | ||
* @param cdr CDR serialization object. | ||
*/ | ||
eProsima_user_DllExport void serialize( | ||
eprosima::fastcdr::Cdr &cdr) const; | ||
|
||
/*! | ||
* @brief This function deserializes an object using CDR serialization. | ||
* @param cdr CDR serialization object. | ||
*/ | ||
eProsima_user_DllExport void deserialize( | ||
eprosima::fastcdr::Cdr &cdr); | ||
|
||
/*! | ||
* @brief This function returns the maximum serialized size of the Key of an object | ||
* depending on the buffer alignment. | ||
* @param current_alignment Buffer alignment. | ||
* @return Maximum serialized size. | ||
*/ | ||
eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize( | ||
size_t current_alignment = 0); | ||
|
||
/*! | ||
* @brief This function tells you if the Key has been defined for this type | ||
*/ | ||
eProsima_user_DllExport static bool isKeyDefined(); | ||
|
||
/*! | ||
* @brief This function serializes the key members of an object using CDR serialization. | ||
* @param cdr CDR serialization object. | ||
*/ | ||
eProsima_user_DllExport void serializeKey( | ||
eprosima::fastcdr::Cdr &cdr) const; | ||
|
||
eProsima_user_DllExport void set_control_id(uint64_t new_control_id); | ||
eProsima_user_DllExport uint64_t get_control_id() const; | ||
|
||
private: | ||
uint64_t control_id; | ||
}; | ||
|
||
} // namespace topics | ||
} // namespace realdds | ||
|
||
#endif |
70 changes: 70 additions & 0 deletions
70
third-party/realdds/include/realdds/topics/ros2/ros2getcontrolvalue-requestPubSubTypes.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// License: Apache 2.0. See LICENSE file in root directory. | ||
// Copyright(c) 2023-4 Intel Corporation. All Rights Reserved. | ||
|
||
|
||
#ifndef _GET_CONTROL_VALUE_REQUEST_PUBSUBTYPES_H_ | ||
#define _GET_CONTROL_VALUE_REQUEST_PUBSUBTYPES_H_ | ||
|
||
#include <fastdds/dds/topic/TopicDataType.hpp> | ||
#include <fastrtps/utils/md5.h> | ||
#include "ros2getcontrolvalue-request.h" | ||
|
||
#if !defined(GEN_API_VER) || (GEN_API_VER != 1) | ||
#error Generated Header is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen. | ||
#endif // GEN_API_VER | ||
|
||
namespace realdds | ||
{ | ||
namespace topics | ||
{ | ||
|
||
class GetControlValueRequestPubSubType : public eprosima::fastdds::dds::TopicDataType | ||
{ | ||
public: | ||
typedef GetControlValueRequest type; | ||
|
||
eProsima_user_DllExport GetControlValueRequestPubSubType(); | ||
eProsima_user_DllExport virtual ~GetControlValueRequestPubSubType() override; | ||
|
||
eProsima_user_DllExport bool serialize(void *data, eprosima::fastrtps::rtps::SerializedPayload_t *payload) override; | ||
eProsima_user_DllExport bool deserialize(eprosima::fastrtps::rtps::SerializedPayload_t *payload, void *data) override; | ||
eProsima_user_DllExport std::function<uint32_t()> getSerializedSizeProvider(void *data) override; | ||
eProsima_user_DllExport void *createData() override; | ||
eProsima_user_DllExport void deleteData(void *data) override; | ||
eProsima_user_DllExport bool getKey(void *data, eprosima::fastrtps::rtps::InstanceHandle_t *handle, bool force_md5 = false) override; | ||
|
||
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED | ||
eProsima_user_DllExport inline bool is_bounded() const override | ||
{ | ||
return false; | ||
} | ||
|
||
#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED | ||
|
||
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN | ||
eProsima_user_DllExport inline bool is_plain() const override | ||
{ | ||
return false; | ||
} | ||
|
||
#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN | ||
|
||
#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE | ||
eProsima_user_DllExport inline bool construct_sample( | ||
void *memory) const override | ||
{ | ||
(void)memory; | ||
return false; | ||
} | ||
|
||
#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE | ||
|
||
private: | ||
MD5 m_md5; | ||
unsigned char *m_keyBuffer; | ||
}; | ||
|
||
} // namespace topics | ||
} // namespace realdds | ||
|
||
#endif |
Oops, something went wrong.