/realtime/src/acquisition/neuromag/include/dacqcomm.h

https://bitbucket.org/palday/fieldtrip · C Header · 72 lines · 43 code · 10 blank · 19 comment · 0 complexity · 6a0d4a4541953abca5863e3299f8f250 MD5 · raw file

  1. /* Automatically generated file, chages will not survive!*/
  2. /* Copyright (c) 2010 Elekta Neuromag Oy, all rights reserved.*/
  3. /* Generated Fri Jan 15 10:42:20 EET 2010 by mjk @ mjk.neuromag.fi */
  4. #ifndef dacqcomm_h_included
  5. #define dacqcomm_h_included
  6. /*
  7. *
  8. * Copyright 1994-2003
  9. *
  10. * Lauri Parkkonen
  11. * Neuromag, Ltd.
  12. * Helsinki, Finland
  13. *
  14. * No part of this program may be photocopied, reproduced,
  15. * or translated to another program language without the
  16. * prior written consent of the author.
  17. *
  18. * $Id$
  19. */
  20. #include <sys/socket.h>
  21. #include <netinet/in.h>
  22. #include <netdb.h>
  23. typedef struct sockaddr_in dacq_inet_address;
  24. #define DACQ_REPLY_PACKET 1
  25. #define DACQ_REPLY_RFC 2
  26. #define DACQ_REPLY_BINARY 4
  27. #define DACQ_REPLY_ASCII 8
  28. #define DACQ_DRAIN_INPUT 0
  29. #define DACQ_KEEP_INPUT MSG_PEEK
  30. #define DACQ_REPLY_GOOD 1
  31. #define DACQ_REPLY_BAD 0
  32. #define DACQ_REPLY_ERROR -1
  33. #define DACQ_CMD_PASSWORD "pass"
  34. #define DACQ_CMD_NAME "name"
  35. #define DACQ_CMD_ABOUT "abou"
  36. #define DACQ_CMD_MONITOR "moni"
  37. #define DACQ_CMD_HELP "help"
  38. #define DACQ_CMD_QUIT "quit"
  39. /* Automagic section follows */
  40. #if defined(__cplusplus)
  41. extern "C" {
  42. #endif
  43. /* client.c */
  44. extern int dacq_server_set_write_timeout(int s);
  45. extern int dacq_server_set_read_timeout(int s);
  46. extern int dacq_server_get_write_timeout(void);
  47. extern int dacq_server_get_read_timeout(void);
  48. extern int dacq_server_send(int *server, char *buf, int nbytes, int flags);
  49. extern int dacq_server_recv(int *server, char *buf, int bufsiz, int flags);
  50. extern int dacq_server_check_reply(const char *buf);
  51. extern int dacq_server_command(int *server, char *command, ...);
  52. extern char *dacq_server_query(int *server, char *command, ...);
  53. extern int dacq_server_close(int *server, char *quit_message);
  54. extern int dacq_server_connect_by_addresses(dacq_inet_address *hostaddr);
  55. extern int dacq_server_connect_by_address(dacq_inet_address *hostaddr, const char *servicename);
  56. extern int dacq_server_connect_by_name(const char *hostname, const char *servicename);
  57. extern int dacq_server_connect_by_name_quiet(const char *hostname, const char *servicename);
  58. extern int dacq_server_login(int *server, const char *password, const char *myname);
  59. #if defined(__cplusplus)
  60. }
  61. #endif
  62. #endif /* of file */