agboxshm.h 820 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef AGBOXSHM_H
  2. #define AGBOXSHM_H
  3. #include <stdbool.h>
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <sys/types.h>
  7. #include <sys/ipc.h>
  8. #include <sys/shm.h>
  9. #define SHM_PORT 8522
  10. #define SHM_PATH "/"
  11. typedef struct{
  12. int device_type;
  13. char product_code[50];
  14. char attribute_name[60];
  15. char attribute_code[20];
  16. unsigned int Enabled;
  17. } ProductAttribute;
  18. typedef struct{
  19. int device_type;
  20. char device_code[50];
  21. char device_id[50];
  22. char product_code[50];
  23. char device_gateway[50];
  24. unsigned int lastTime;
  25. unsigned int Enabled;
  26. }Device;
  27. typedef struct {
  28. uint t_time;
  29. }ProcessStatus;
  30. typedef struct {
  31. unsigned char Enabled;
  32. Device device[1024];
  33. ProcessStatus processStatus[128];
  34. ProductAttribute procuctattrbute[300];
  35. }AGBoxShm;
  36. #endif // AGBOXSHM_H