Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

63 Zeilen
2.1 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_RESULT;
  19. PLC_DEVICE_RESULT PlcDeviceInit(void);
  20. PLC_DEVICE_RESULT PlcDeviceReadHsd(uint16_t address, int32_t *value);
  21. PLC_DEVICE_RESULT PlcDeviceWriteHsdConfig(uint16_t address, int32_t value);
  22. PLC_DEVICE_RESULT PlcDevicePublishHsdRuntime(uint16_t address, int32_t value);
  23. PLC_DEVICE_RESULT PlcDeviceReadHsdPair(uint16_t lowAddress, int64_t *value);
  24. PLC_DEVICE_RESULT PlcDevicePublishHsdPair(uint16_t lowAddress, int64_t value);
  25. PLC_DEVICE_RESULT PlcDeviceCheckpointHsd(void);
  26. PLC_DEVICE_RESULT PlcDeviceReadSfd(uint16_t address, int32_t *value);
  27. PLC_DEVICE_RESULT PlcDeviceWriteSfd(uint16_t address, int32_t value);
  28. PLC_DEVICE_RESULT PlcDeviceLoadSfd(void);
  29. PLC_DEVICE_RESULT PlcDeviceSaveSfd(void);
  30. PLC_DEVICE_RESULT PlcDeviceReadSm(uint16_t address, uint8_t *state);
  31. PLC_DEVICE_RESULT PlcDeviceWriteSm(uint16_t address, uint8_t state);
  32. PLC_DEVICE_RESULT PlcDevicePublishSm(uint8_t axis,
  33. uint8_t pulseActive,
  34. uint8_t direction);
  35. PLC_DEVICE_RESULT PlcDeviceReadSd(uint16_t address, int32_t *value);
  36. PLC_DEVICE_RESULT PlcDeviceWriteSd(uint16_t address, int32_t value);
  37. PLC_DEVICE_RESULT PlcDevicePublishSd(uint8_t axis,
  38. uint8_t item,
  39. int32_t value);
  40. PLC_DEVICE_RESULT PlcDeviceGetEventAddress(uint8_t axis,
  41. uint16_t segmentNumber,
  42. uint16_t *eventAddress);
  43. uint8_t PlcDeviceIsHsdDirty(void);
  44. uint8_t PlcDeviceIsSfdDirty(void);
  45. PLSR_PERSISTENCE_RESULT PlcDeviceGetLastHsdLoadResult(void);
  46. PLSR_PERSISTENCE_RESULT PlcDeviceGetLastSfdLoadResult(void);
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* PLC_DEVICE_H */