opcuaServer.c 713 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. ============================================================================
  3. Name : opcuaServer.c
  4. Author :
  5. Version :
  6. Copyright : Your copyright notice
  7. Description : lala
  8. ============================================================================
  9. */
  10. #include <stdio.h>
  11. #include <stdlib.h>
  12. #include "networklayer.h"
  13. #include "ua_application.h"
  14. UA_Int32 serverCallback(void * arg) {
  15. char *name = (char *) arg;
  16. printf("%s does whatever servers do\n",name);
  17. return UA_SUCCESS;
  18. }
  19. int main(int argc, char** argv) {
  20. appMockup_init();
  21. NL_data* nl = NL_init(&NL_Description_TcpBinary,16664);
  22. struct timeval tv = {20, 0}; // 20 seconds
  23. NL_msgLoop(nl, &tv,serverCallback,argv[0]);
  24. }