PLCnext API Documentation  21.6.0.46
INetloadLimiterService.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Rsc/Services/IRscService.hpp"
9 #include "NetloadLimiterServiceProxyFactory.hpp"
10 #include "NetloadLimiterErrorCode.hpp"
11 #include "NetloadLimiterSettings.hpp"
12 #include "NetloadLimiterState.hpp"
13 
14 // DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY INetloadLimiterService.cs
15 
16 namespace Arp { namespace Hardware { namespace Nim { namespace Services
17 {
18 
19 using namespace Arp;
20 using namespace Arp::System::Rsc::Services;
21 
26 {
27 public: // typedefs
28  using Ptr = std::shared_ptr<INetloadLimiterService>;
29 
30 public: // construction/destruction
32  INetloadLimiterService(void) = default;
33 
34 public: // static policy operation
35  static IRscServiceProxyFactory& GetProxyFactory(void);
36 
37 public: // abstract operations
44  virtual NetloadLimiterErrorCode GetSettings(uint8 networkInterface, NetloadLimiterSettings& settings) = 0;
45 
52  virtual NetloadLimiterErrorCode SetSettings(uint8 networkInterface, const NetloadLimiterSettings& settings) = 0;
53 
60  virtual NetloadLimiterErrorCode SetByteLimit(uint8 networkInterface, uint32 limit) = 0;
61 
68  virtual NetloadLimiterErrorCode SetPacketLimit(uint8 networkInterface, uint16 limit) = 0;
69 
75  virtual NetloadLimiterErrorCode EnableByteLimiter(uint8 networkInterface) = 0;
76 
82  virtual NetloadLimiterErrorCode DisableByteLimiter(uint8 networkInterface) = 0;
83 
89  virtual NetloadLimiterErrorCode EnablePacketLimiter(uint8 networkInterface) = 0;
90 
96  virtual NetloadLimiterErrorCode DisablePacketLimiter(uint8 networkInterface) = 0;
97 
104  virtual NetloadLimiterErrorCode GetState(uint8 networkInterface, NetloadLimiterState& state) = 0;
105 };
106 
108 // inline methods of class INetloadLimiterService
109 inline IRscServiceProxyFactory& INetloadLimiterService::GetProxyFactory()
110 {
111  return NetloadLimiterServiceProxyFactory::GetInstance();
112 }
113 
114 }}}} // end of namespace Arp::Hardware::Nim::Services
This struct contains the current state of the network limiter for one network interface.
Definition: NetloadLimiterState.hpp:23
Namespace for classes and interfaces for the Remote Service Call implementation
Definition: IRscReadEnumerator.hxx:9
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:35
NetloadLimiterErrorCode
This enum contains the error codes for the operations of the netload limiter services.
Definition: NetloadLimiterErrorCode.hpp:20
This Services controls the NetloadLimiter
Definition: INetloadLimiterService.hpp:25
std::uint8_t uint8
The Arp unsigned integer type of 1 byte size.
Definition: PrimitiveTypes.hpp:27
Root namespace for the PLCnext API
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
Base interface for all Rsc service interface.
Definition: IRscService.hpp:18
This struct contains all settings of the netload limiter. It is used to set and get the current setti...
Definition: NetloadLimiterSettings.hpp:23