ua_architecture_functions.c 1008 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  2. * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  3. *
  4. * Copyright 2018 (c) Jose Cabral, fortiss GmbH
  5. * Copyright 2018 (c) Stefan Profanter, fortiss GmbH
  6. */
  7. #ifdef UA_ARCHITECTURE_ARDUINO
  8. #include "ua_types.h"
  9. unsigned int UA_socket_set_blocking(UA_SOCKET sockfd){
  10. int on = 0;
  11. if(lwip_ioctl(sockfd, FIONBIO, &on) < 0)
  12. return UA_STATUSCODE_BADINTERNALERROR;
  13. return UA_STATUSCODE_GOOD;
  14. }
  15. unsigned int UA_socket_set_nonblocking(UA_SOCKET sockfd){
  16. int on = 1;
  17. if(lwip_ioctl(sockfd, FIONBIO, &on) < 0)
  18. return UA_STATUSCODE_BADINTERNALERROR;
  19. return UA_STATUSCODE_GOOD;
  20. }
  21. int gethostname_freertos(char* name, size_t len){
  22. // use UA_ServerConfig_set_customHostname to set your hostname as the IP
  23. return -1;
  24. }
  25. void UA_initialize_architecture_network(void){
  26. return;
  27. }
  28. void UA_deinitialize_architecture_network(void){
  29. return;
  30. }
  31. #endif /* UA_ARCHITECTURE_ARDUINO */