PLCnext API Documentation  20.6.0.30321
Classes | Typedefs | Enumerations | Functions
Arp::Plc::Commons::Domain Namespace Reference

Namespace for interfaces and classes of the PLC Domain More...

Classes

class  DualDomain
 
class  IPlcChangeComponent
 This interfaces shall be implemented by any Plc component supporting the download changes feature. More...
 
class  IPlcComponent
 
class  IPlcEventComponent
 
class  PlcDomainProxy
 

Typedefs

using PlcEventSender = event< void *, PlcEvent >
 This type defines the signature of Plc event sender: the first parameter is the event sender, the second the PlcEvent to send. More...
 
using PlcEventReceiver = delegate< void(void *, PlcEvent)>
 This delegate defines the signature of Plc event receiver and matches the PlcEventSender signature. More...
 

Enumerations

enum  PlcEvent {
  PlcEvent::None = 0, PlcEvent::Halt = 1, PlcEvent::Continue = 2, PlcEvent::Exception = 3,
  PlcEvent::CancelDebug = 4, PlcEvent::WarmStartNotPossible = 5, PlcEvent::FatalException = 6, PlcEvent::EnableForcing = 7,
  PlcEvent::DisableForcing = 8, PlcEvent::EnableDebugging = 9, PlcEvent::DisableDebugging = 10, PlcEvent::SaveRetainData = 11
}
 
enum  PlcStartKind : byte { None = 0, Cold = 1, Warm = 2, Hot = 3 }
 
enum  PlcState : uint32 {
  PlcState::None = 0, PlcState::Ready = 1, PlcState::Stop = 2, PlcState::Running = 3,
  PlcState::Halt = 4, PlcState::StateMask = 0x3F, PlcState::FlagsMask = ~StateMask, PlcState::Warning = (1 << 6),
  PlcState::Error = (1 << 7), PlcState::SuspendedBySwitch = (1 << 8), PlcState::FatalError = (1 << 9), PlcState::SuspendedBySystemWatchdog = (1 << 10),
  PlcState::Changing = (1 << 16), PlcState::Hot = (1 << 17), PlcState::Forcing = (1 << 18), PlcState::Debugging = (1 << 19),
  PlcState::Warm = (1 << 20), PlcState::DcgNotPossible = (1 << 30), PlcState::DcgRealTimeViolation = (1U << 31), PlcState::ClearMask = StateMask | Hot | Warm | Changing | Forcing | Debugging,
  PlcState::RemainingMask = StateMask | Hot | Warm | Forcing | Debugging | Warning | Error | FatalError
}
 

Functions

std::ostream & operator<< (std::ostream &os, PlcEvent arg)
 
std::istream & operator>> (std::istream &is, PlcEvent &arg)
 
std::ostream & operator<< (std::ostream &os, PlcStartKind arg)
 
std::istream & operator>> (std::istream &is, PlcStartKind &arg)
 
std::ostream & operator<< (std::ostream &os, PlcState arg)
 
std::istream & operator>> (std::istream &is, PlcState &arg)
 
constexpr PlcState operator & (PlcState lhs, PlcState rhs)
 
constexpr PlcState operator| (PlcState lhs, PlcState rhs)
 
PlcStateoperator &= (PlcState &lhs, PlcState rhs)
 
PlcStateoperator|= (PlcState &lhs, PlcState rhs)
 
PlcState operator~ (PlcState arg)
 

Detailed Description

Namespace for interfaces and classes of the PLC Domain

Typedef Documentation

◆ PlcEventReceiver

using Arp::Plc::Commons::Domain::PlcEventReceiver = typedef delegate<void(void*, PlcEvent)>

This delegate defines the signature of Plc event receiver and matches the PlcEventSender signature.

◆ PlcEventSender

This type defines the signature of Plc event sender: the first parameter is the event sender, the second the PlcEvent to send.

Enumeration Type Documentation

◆ PlcEvent

Enumerator
None 

Not specified or not set.

Halt 

The PLC changes its state from Running to debug Halt.

Continue 

The PLC changes its state from debug Halt to Running.

Exception 

A PLC exception occurs.

CancelDebug 

Cancel debug mode, PLC attempts to stop in Halt state.

WarmStartNotPossible 

The warm start is not possible fired by the RetainComponent.

FatalException 

A fatal PLC exception occurs.

EnableForcing 

The PLC set its state to Forcing.

DisableForcing 

The PLC disabled force mode.

EnableDebugging 

The PLC set its state to Debugging.

DisableDebugging 

The PLC disabled debug mode.

SaveRetainData 

Save retain data to retain memory.

◆ PlcState

Enumerator
None 

Not specified.

Ready 

The firmware is setup, and the PLC is ready.

Stop 

The PLC is loaded and setup but not started yet.

Running 

The PLC is started.

Halt 

The PLC is halted for debug purpose.

StateMask 

Use this entry to de-mask the raw PLC state value.

FlagsMask 

Use this entry to de-mask the flags portion of this PLC state.

Warning 

An unspecified warning occurs.

Error 

An unspecified error or exception occurs, and the PLC is in state error.

SuspendedBySwitch 

This error bit is set, if it could not be started because the PLC is suspended by the hardware switch (STOP-switch).

FatalError 

An unspecified fatal error or exception occurs, and the PLC is in state error.

SuspendedBySystemWatchdog 

This error bit is set, if it could not be started because the PLC is suspended by the system watchdog.

Changing 

The PLC is changing a configuration, this implies, that the state Running is set.

Hot 

The PLC is stopped in hot state, that is all data still remains.

Forcing 

The PLC is in force mode. One or more variables are forced by the GDS.

Debugging 

The PLC is in debug mode. One or more breakpoints are set.

Warm 

The PLC is stopped in warm state, that is the retain data has been restored.

DcgNotPossible 

This error bit is set, if the PLC tries to perform a change operation, but it is not possible.

This bit is usually combined with the state Running.

DcgRealTimeViolation 

This error bit is set, if the PLC tries to perform a change operation, but it is not possible in real time.

This bit is usually combined with the state Running.

ClearMask 

This mask defines all states which should be cleared before any PLC operation.

It is a combination of all bits which should remain.

ARP_DEPRECATED("Use RemainingMask instead. The name of this entry is not self-explanatory.")

RemainingMask 

This mask defines all states which should not be cleared before any PLC operation. All other flags are reset.

It is a combination of all bits which should remain.