DSClientEvent.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 DSClientEvent.h
  16. *
  17. */
  18. #ifndef _FASTDDS_RTPS_DSCLIENTEVENT_H_
  19. #define _FASTDDS_RTPS_DSCLIENTEVENT_H_
  20. #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
  21. #include <fastdds/rtps/resources/TimedEvent.h>
  22. namespace eprosima {
  23. namespace fastrtps{
  24. namespace rtps {
  25. class PDPClient;
  26. /**
  27. * Class DSClientEvent, TimedEvent used to synchronize discover-server clients
  28. *@ingroup DISCOVERY_MODULE
  29. */
  30. class DSClientEvent : public TimedEvent {
  31. public:
  32. /**
  33. * Constructor.
  34. * @param p_PDP Pointer to the PDPClient.
  35. * @param interval Interval in ms.
  36. */
  37. DSClientEvent(PDPClient* p_PDP,
  38. double interval);
  39. ~DSClientEvent();
  40. /**
  41. * Method invoked when the event occurs.
  42. * This temporal event:
  43. + resends the client RTPSParticipantProxyData to all remote servers.
  44. + matches the EDP endpoints when the servers are all aware of this client existence
  45. */
  46. bool event();
  47. //!Pointer to the PDPServer object.
  48. PDPClient* mp_PDP;
  49. };
  50. }
  51. } /* namespace rtps */
  52. } /* namespace eprosima */
  53. #endif
  54. #endif /* _FASTDDS_RTPS_DSCLIENTEVENT_H_ */