PLCnext API Documentation 25.0.2.69
PlcManager.h
1/******************************************************************************
2 *
3// Copyright Phoenix Contact GmbH & Co. KG
4 *
5 *****************************************************************************/
6#ifndef __APRPLCDOMAIN_PLCMANAGER_H
7#define __APRPLCDOMAIN_PLCMANAGER_H
8
9/*************************************************************************/
10/* INCLUDES */
11/*************************************************************************/
12#include "Arp/Plc/AnsiC/ArpPlc.h"
13
14/*************************************************************************/
15/* DEFINES */
16/*************************************************************************/
17
18#ifdef __cplusplus
19extern "C"
20{
21#endif /*__cplusplus*/
22
23// PlcStartKind
24typedef enum
25{
26 PlcStartKind_Cold = 1,
27 PlcStartKind_Warm = 2,
28 PlcStartKind_Hot = 3,
29 PlcStartKind_RestoreWarm = 4,
30} TPlcStartKind;
31
32
33// PlcState
34typedef enum
35{
36 PlcState_None = 0,
37 PlcState_Ready = 1,
38 PlcState_Stop = 2,
39 PlcState_Running = 3,
40 PlcState_Halt = 4,
41 PlcState_StateMask = 0x3F,
42 /* error/warning flags */
43 PlcState_Warning = (1 << 6),
44 PlcState_Error = (1 << 7),
45 PlcState_SuspendedBySwitch = (1 << 8), /* Deprecated since 2022.0! Please use "PlcState_Suspended" instead */
46 PlcState_Suspended = (1 << 8),
47 PlcState_FatalError = (1 << 9),
48 PlcState_Blocked = (1 << 10),
49 /* combined hint flags */
50 PlcState_Changing = (1 << 16),
51 /* combined flags usually with PlcState_Running */
52 PlcState_DcgNotPossible = (1 << 30),
53 PlcState_DcgRealTimeViolation = (1U << 31)
54
55} TPlcState;
56
57/*************************************************************************/
58/* GLOBAL FUNCTION DECLARATIONS (EXTERNAL) */
59/*************************************************************************/
60
61
62extern ARP_C_SYMBOL_EXPORT bool ArpPlcDomain_Load(void);
63
64extern ARP_C_SYMBOL_EXPORT bool ArpPlcDomain_Start(TPlcStartKind plcStartKind);
65
66extern ARP_C_SYMBOL_EXPORT bool ArpPlcDomain_Stop(void);
67
68extern ARP_C_SYMBOL_EXPORT bool ArpPlcDomain_Reset(void);
69
70extern ARP_C_SYMBOL_EXPORT TPlcState ArpPlcDomain_GetPlcState(void);
71
72#ifdef __cplusplus
73} /*extern "C"*/
74#endif /*__cplusplus*/
75
76#endif /*__APRPLCDOMAIN_PLCMANAGER_H*/