PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Arp::Plc::Domain::Services::IPlcManagerService Class Referenceabstract

Use this service to control the PLC of the controller. More...

#include <IPlcManagerService.hpp>

Inheritance diagram for Arp::Plc::Domain::Services::IPlcManagerService:
Inheritance graph

Public Types

using Ptr = std::shared_ptr< IPlcManagerService >
 
- Public Types inherited from Arp::Base::Rsc::Commons::IRscService
using Ptr = std::shared_ptr< IRscService >
 The shared_ptr type of IRscService.
 

Public Member Functions

 IPlcManagerService (void)=default
 Constructs an IPlcManagerService instance.
 
virtual void Load (boolean async=false)=0
 Loads the PLC configuration and setup the PLC. More...
 
virtual void Start (PlcStartKind startKind, boolean async=false)=0
 Starts the PLC. More...
 
virtual void Stop (boolean async=false)=0
 Stops the PLC. More...
 
virtual void Reset (boolean async=false)=0
 Resets the PLC and unloads its configuration. More...
 
virtual PlcState GetPlcState ()=0
 Gets the actual PLC state. More...
 
- Public Member Functions inherited from Arp::Base::Rsc::Commons::IRscService
 IRscService (void)=default
 The default constructor.
 
 IRscService (const IRscService &arg)=delete
 The deleted copy constructor. More...
 
 IRscService (IRscService &&arg) noexcept=default
 The default move constructor. More...
 
IRscServiceoperator= (const IRscService &arg)=delete
 The deleted assignment operator. More...
 
IRscServiceoperator= (IRscService &&arg) noexcept=default
 The default move-assignment operator. More...
 
virtual ~IRscService (void)=default
 Destructs this instance and frees all resources.
 

Static Public Member Functions

static IRscServiceProxyFactoryGetProxyFactory (void)
 
- Static Public Member Functions inherited from Arp::Base::Rsc::Commons::IRscService
static IRscServiceProxyFactoryGetProxyFactory (void)
 Returns a reference to service proxy factory to create a proxy instance of this service. More...
 

Detailed Description

Use this service to control the PLC of the controller.

This service is defined in library Arp.Plc.Domain.

Realtime Usage: This API call does not have to be deterministic in runtime behaviour, so an asynchronous execution should be considered.

Member Function Documentation

◆ GetPlcState()

virtual PlcState Arp::Plc::Domain::Services::IPlcManagerService::GetPlcState ( )
pure virtual

Gets the actual PLC state.

Returns
The current PLC state. If the PLC has a warning, the Arp.Plc.Domain.Services.PlcState.Warning Bit is set. If the PLC has an actual error, the Arp.Plc.Domain.Services.PlcState.Error Bit is set.

◆ Load()

virtual void Arp::Plc::Domain::Services::IPlcManagerService::Load ( boolean  async = false)
pure virtual

Loads the PLC configuration and setup the PLC.

Parameters
asynctrue, if the operation should be processed asynchronously, otherwise false.

◆ Reset()

virtual void Arp::Plc::Domain::Services::IPlcManagerService::Reset ( boolean  async = false)
pure virtual

Resets the PLC and unloads its configuration.

Parameters
asynctrue, if the operation should be processed asynchronously, otherwise false.

◆ Start()

virtual void Arp::Plc::Domain::Services::IPlcManagerService::Start ( PlcStartKind  startKind,
boolean  async = false 
)
pure virtual

Starts the PLC.

Parameters
startKindDetermines how the PLC should be started.
StartKindDescription
Arp.Plc.Domain.Services.PlcStartKind.ColdA cold start is processed. That is, all data is set to initial values.
Arp.Plc.Domain.Services.PlcStartKind.WarmA warm start is processed. That is, all data is set to initial values but retained data is set to the retained values.
Arp.Plc.Domain.Services.PlcStartKind.RestoreWarmA recover warm start is processed. That is, all data is set to initial values but retained data is set to the retained values from the prepared retain backup file.
Arp.Plc.Domain.Services.PlcStartKind.HotThe PLC is just continued without setting or resetting any data.
asynctrue, if the operation should be processed asynchronously, otherwise false.

If the actual state of the PLC is Arp.Plc.Domain.Services.PlcState.Ready, Arp.Plc.Domain.Services.PlcState.Running or Arp.Plc.Domain.Services.PlcState.Halt, the operation is ignored.

◆ Stop()

virtual void Arp::Plc::Domain::Services::IPlcManagerService::Stop ( boolean  async = false)
pure virtual

Stops the PLC.

Parameters
asynctrue, if the operation should be processed asynchronously, otherwise false.

The documentation for this class was generated from the following file: