YT_EHOME_shm.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef YT_EHOME_SHM_H
  2. #define YT_EHOME_SHM_H
  3. #include <stdbool.h>
  4. #include <sys/types.h>
  5. #include <sys/shm.h>
  6. #include <sys/ipc.h>
  7. #include <stdlib.h>
  8. #include <stdio.h>
  9. //#include <QDateTime>
  10. #define SHM_PATH "/"
  11. #define SHM_PORT 38808
  12. #define DEVICES_COUNT 1024
  13. #define GET_LIVE_LIST 1
  14. #define GET_ONLINE_LIST 2
  15. #define ACTIVE_LIVE 3
  16. typedef struct {
  17. unsigned short YEAR;
  18. unsigned char MONTH;
  19. unsigned char DAY;
  20. unsigned char HOUR;
  21. unsigned char MINUTE;
  22. unsigned char SECOND;
  23. unsigned int TIMESTAMP;
  24. }CurrentTime,FullTime;
  25. typedef struct {
  26. long LoginId;
  27. long SessionId;
  28. long listen_preview_handle;
  29. long listen_alarm_handle;
  30. long lLinkHandle;
  31. long previewId;
  32. unsigned short previewport;
  33. unsigned short alarmport;
  34. unsigned char Connected;
  35. unsigned char Inited;
  36. unsigned char onLined;
  37. unsigned char savetmp;
  38. unsigned char transed;
  39. unsigned char io[16];
  40. uint time[2];
  41. FullTime onLinetime;
  42. FullTime transtime;
  43. char deviceID[64];
  44. char devIp[128];
  45. char filename[128];
  46. char rtsppath[1024];
  47. FILE *tmpfile;
  48. }EHomeDevice;
  49. typedef struct {
  50. uint workingTime[16];
  51. EHomeDevice eHomeDevice[DEVICES_COUNT];
  52. }MyEHomeShm;
  53. #endif // YT_EHOME_SHM_H