PLCnext API Documentation  20.0.0.24462
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

typedef std::shared_ptr< IForceServicePtr
 
- Public Types inherited from Arp::System::Rsc::Services::IRscService
typedef std::shared_ptr< IRscServicePtr
 

Public Member Functions

 IForceService (void)
 Constructs an IForceService instance. More...
 
virtual ~IForceService (void)
 Destructs this instance and frees all resouces. More...
 
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::System::Rsc::Services::IRscService
 IRscService (void)=default
 Constructs an IRscService instance. More...
 
virtual ~IRscService (void)=default
 Destructs this instance and frees all resouces. More...
 

Static Public Member Functions

static IRscServiceProxyFactory & GetProxyFactory (void)
 
- Static Public Member Functions inherited from Arp::System::Rsc::Services::IRscService
static IRscServiceProxyFactory & GetProxyFactory (void)
 Returns a reference to service proxy factory to create a proxy instance of the 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.

Constructor & Destructor Documentation

◆ IForceService()

IForceService::IForceService ( void  )
inline

Constructs an IForceService instance.

◆ ~IForceService()

IForceService::~IForceService ( void  )
inlinevirtual

Destructs this instance and frees all resouces.

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: