DServerEvent.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 DServerEvent.h
  16. *
  17. */
  18. #ifndef _FASTDDS_RTPS_DSERVEREVENT_H_
  19. #define _FASTDDS_RTPS_DSERVEREVENT_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 PDPServer;
  26. /**
  27. * Class DServerEvent, TimedEvent used to synchronize discover-server servers
  28. *@ingroup DISCOVERY_MODULE
  29. */
  30. class DServerEvent : public TimedEvent {
  31. public:
  32. /**
  33. * Constructor.
  34. * @param p_PDP Pointer to the PDPServer.
  35. * @param interval Interval in ms.
  36. */
  37. DServerEvent(PDPServer* p_PDP,
  38. double interval);
  39. ~DServerEvent();
  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. PDPServer* mp_PDP;
  49. //!Initialize PDP reception when first run
  50. bool messages_enabled_;
  51. };
  52. }
  53. } /* namespace rtps */
  54. } /* namespace eprosima */
  55. #endif
  56. #endif /* _FASTDDS_RTPS_DSERVEREVENT_H_ */