EDPClient.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @file EDPClient.h
  16. *
  17. */
  18. #ifndef _FASTDDS_RTPS_EDPCLIENT_H_
  19. #define _FASTDDS_RTPS_EDPCLIENT_H_
  20. #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
  21. #include <fastdds/rtps/builtin/discovery/endpoint/EDPSimple.h>
  22. namespace eprosima {
  23. namespace fastrtps {
  24. namespace rtps {
  25. /**
  26. * Class EDPClient, extends the EDPSimple functionality to accommodate client side needs
  27. *@ingroup DISCOVERY_MODULE
  28. */
  29. class EDPClient : public EDPSimple
  30. {
  31. public:
  32. /**
  33. * Constructor.
  34. * @param p Pointer to the PDP
  35. * @param part Pointer to the RTPSParticipantImpl
  36. */
  37. EDPClient(
  38. PDP* p,
  39. RTPSParticipantImpl* part)
  40. : EDPSimple(p, part)
  41. {
  42. }
  43. /**
  44. * This method generates the corresponding change in the subscription writer and send it to all known remote endpoints.
  45. * @param reader Pointer to the Reader object.
  46. * @param rdata Pointer to the ReaderProxyData object.
  47. * @return true if correct.
  48. */
  49. bool processLocalReaderProxyData(
  50. RTPSReader* reader,
  51. ReaderProxyData* rdata) override;
  52. /**
  53. * This method generates the corresponding change in the publciations writer and send it to all known remote endpoints.
  54. * @param writer Pointer to the Writer object.
  55. * @param wdata Pointer to the WriterProxyData object.
  56. * @return true if correct.
  57. */
  58. bool processLocalWriterProxyData(
  59. RTPSWriter* writer,
  60. WriterProxyData* wdata) override;
  61. /**
  62. * This methods generates the change disposing of the local Reader and calls the unpairing and removal methods of the base class.
  63. * @param R Pointer to the RTPSReader object.
  64. * @return True if correct.
  65. */
  66. bool removeLocalReader(
  67. RTPSReader*R) override;
  68. /**
  69. * This methods generates the change disposing of the local Writer and calls the unpairing and removal methods of the base class.
  70. * @param W Pointer to the RTPSWriter object.
  71. * @return True if correct.
  72. */
  73. bool removeLocalWriter(
  74. RTPSWriter*W) override;
  75. };
  76. }
  77. } /* namespace rtps */
  78. } /* namespace eprosima */
  79. #endif
  80. #endif /* _FASTDDS_RTPS_EDPCLIENT_H_ */