networkhandler.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*******************************************************************************
  2. * Copyright (c) 2009, Rockwell Automation, Inc.
  3. * All rights reserved.
  4. *
  5. ******************************************************************************/
  6. #ifndef OPENER_NETWORKHANDLER_H_
  7. #define OPENER_NETWORKHANDLER_H_
  8. #include <string.h>
  9. #include <sys/socket.h>
  10. #include "typedefs.h"
  11. /** @brief Executes platform dependent network handler initialization code
  12. *
  13. * @return EipStatusOk if initialization was successful, otherwise EipStatusError
  14. */
  15. EipStatus NetworkHandlerInitializePlatform(void);
  16. /** @brief Platform dependent code to close a socket
  17. *
  18. * @param socket_handle The socket handle to be closed
  19. */
  20. void CloseSocketPlatform(int socket_handle);
  21. /** @brief This function shall return the current time in microseconds relative to epoch, and shall be implemented in a port specific networkhandler
  22. *
  23. * @return Current time relative to epoch as MicroSeconds
  24. */
  25. MicroSeconds GetMicroSeconds(void);
  26. /** @brief This function shall return the current time in milliseconds relative to epoch, and shall be implemented in a port specific networkhandler
  27. *
  28. * @return Current time relative to epoch as MilliSeconds
  29. */
  30. MilliSeconds GetMilliSeconds(void);
  31. #endif /* OPENER_NETWORKHANDLER_H_ */