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

Service for managing and controlling force variables by the Arp GDS. More...

#include <IForceService.hpp>

Inheritance diagram for Arp::Plc::Gds::Services::IForceService:
Inheritance graph

Public Types

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

Public Member Functions

 IForceService (void)=default
 Constructs an IForceService instance.
 
virtual DataAccessError AddVariable (const ForceItem &item)=0
 Adds a new variable and value for forcing. Enables force mode. More...
 
virtual void RemoveVariable (const RscString< 512 > &variableName)=0
 Resets forced variable. Disables force mode after force list is empty. More...
 
virtual std::vector< ForceItemGetVariables ()=0
 Gets a list of all forced variables. More...
 
virtual void Reset ()=0
 Resets the force list. Disables force mode. More...
 
virtual boolean IsForcable (const RscString< 512 > &variableName)=0
 Tests whether variable is forcable. More...
 
virtual boolean IsActive ()=0
 Tests whether force mode is active. 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

Service for managing and controlling force variables by the Arp GDS.

Use Arp.Plc.Gds.Services.IForceService in order to force and to unforce variables.

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

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

Member Function Documentation

◆ AddVariable()

virtual DataAccessError Arp::Plc::Gds::Services::IForceService::AddVariable ( const ForceItem item)
pure virtual

Adds a new variable and value for forcing. Enables force mode.

The enabled force mode is signalized by notification and by the activated 'PlcState.Forcing'

Parameters
itemForce item Arp.Plc.Gds.Services.ForceItem, which contains the the name of the variable with the full instance path and the force value. The data type of the force value must be equal with the data type of the target variable.
Returns
Returns Arp.Plc.Gds.Services.DataAccessError.None on success.

◆ GetVariables()

virtual std::vector< ForceItem > Arp::Plc::Gds::Services::IForceService::GetVariables ( )
pure virtual

Gets a list of all forced variables.

Returns
Returns a list with all existing Arp.Plc.Gds.Services.ForceItem objects.

◆ IsActive()

virtual boolean Arp::Plc::Gds::Services::IForceService::IsActive ( )
pure virtual

Tests whether force mode is active.

Returns
trueif the force mode is active.

◆ IsForcable()

virtual boolean Arp::Plc::Gds::Services::IForceService::IsForcable ( const RscString< 512 > &  variableName)
pure virtual

Tests whether variable is forcable.

The variable has to meet the following requirements to be forcable:

  1. The kind of variable should be an In- or an Out-port of a program (IEC, C ++, Simulink ...) or a variable that is connected to I/O data.
  2. The data type of the variable has to be supported.
Returns
trueif the variable is forcable.

◆ RemoveVariable()

virtual void Arp::Plc::Gds::Services::IForceService::RemoveVariable ( const RscString< 512 > &  variableName)
pure virtual

Resets forced variable. Disables force mode after force list is empty.

Parameters
variableNameInstance path of the variable.

◆ Reset()

virtual void Arp::Plc::Gds::Services::IForceService::Reset ( )
pure virtual

Resets the force list. Disables force mode.

The disabled force mode is signalized by notification and by the deactivated PlcState.


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