Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

65 lignes
2.2 KiB

  1. #ifndef PLC_DEVICE_H
  2. #define PLC_DEVICE_H
  3. #include "plsr_address_map.h"
  4. #include "plsr_persistence.h"
  5. #include <stdint.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. typedef enum
  10. {
  11. PLC_DEVICE_OK = 0,
  12. PLC_DEVICE_INVALID_ADDRESS,
  13. PLC_DEVICE_INVALID_ARGUMENT,
  14. PLC_DEVICE_NULL_POINTER,
  15. PLC_DEVICE_READ_ONLY,
  16. PLC_DEVICE_PERSISTENCE_ERROR,
  17. PLC_DEVICE_NOT_IMPLEMENTED,
  18. PLC_DEVICE_BUSY
  19. } PLC_DEVICE_RESULT;
  20. PLC_DEVICE_RESULT PlcDeviceInit(void);
  21. PLC_DEVICE_RESULT PlcDeviceReadHsd(uint16_t address, int32_t *value);
  22. PLC_DEVICE_RESULT PlcDeviceWriteHsdConfig(uint16_t address, int32_t value);
  23. PLC_DEVICE_RESULT PlcDevicePublishHsdRuntime(uint16_t address, int32_t value);
  24. PLC_DEVICE_RESULT PlcDeviceReadHsdPair(uint16_t lowAddress, int64_t *value);
  25. PLC_DEVICE_RESULT PlcDevicePublishHsdPair(uint16_t lowAddress, int64_t value);
  26. PLC_DEVICE_RESULT PlcDeviceCheckpointHsd(void);
  27. PLC_DEVICE_RESULT PlcDeviceReadSfd(uint16_t address, int32_t *value);
  28. PLC_DEVICE_RESULT PlcDeviceWriteSfd(uint16_t address, int32_t value);
  29. PLC_DEVICE_RESULT PlcDeviceLoadSfd(void);
  30. PLC_DEVICE_RESULT PlcDeviceSaveSfd(void);
  31. PLC_DEVICE_RESULT PlcDeviceResetSfdDefaults(void);
  32. PLC_DEVICE_RESULT PlcDeviceReadSm(uint16_t address, uint8_t *state);
  33. PLC_DEVICE_RESULT PlcDeviceWriteSm(uint16_t address, uint8_t state);
  34. PLC_DEVICE_RESULT PlcDevicePublishSm(uint8_t axis,
  35. uint8_t pulseActive,
  36. uint8_t direction);
  37. PLC_DEVICE_RESULT PlcDeviceReadSd(uint16_t address, int32_t *value);
  38. PLC_DEVICE_RESULT PlcDeviceWriteSd(uint16_t address, int32_t value);
  39. PLC_DEVICE_RESULT PlcDevicePublishSd(uint8_t axis,
  40. uint8_t item,
  41. int32_t value);
  42. PLC_DEVICE_RESULT PlcDeviceGetEventAddress(uint8_t axis,
  43. uint16_t segmentNumber,
  44. uint16_t *eventAddress);
  45. uint8_t PlcDeviceIsHsdDirty(void);
  46. uint8_t PlcDeviceIsSfdDirty(void);
  47. PLSR_PERSISTENCE_RESULT PlcDeviceGetLastHsdLoadResult(void);
  48. PLSR_PERSISTENCE_RESULT PlcDeviceGetLastSfdLoadResult(void);
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif /* PLC_DEVICE_H */