-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathBufferedExchangeProgram.hpp
53 lines (43 loc) · 1.7 KB
/
BufferedExchangeProgram.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include <BufferedExchangeComponent.hpp>
#include "Arp/System/Core/Arp.h"
#include "Arp/Plc/Commons/Esm/ProgramBase.hpp"
#include "Arp/System/Commons/Logging.h"
namespace BufferedExchange {
using namespace Arp;
using namespace Arp::System::Commons::Diagnostics::Logging;
using namespace Arp::Plc::Commons::Esm;
//#program
//#component(BufferedExchange::BufferedExchangeComponent)
class BufferedExchangeProgram: public ProgramBase, private Loggable<BufferedExchangeProgram> {
public: // typedefs
public: // construction/destruction
BufferedExchangeProgram(
BufferedExchange::BufferedExchangeComponent &bufferedExchangeComponentArg,
const String &name);
BufferedExchangeProgram(const BufferedExchangeProgram &arg) = delete;
virtual ~BufferedExchangeProgram() = default;
public: // operators
BufferedExchangeProgram& operator=(const BufferedExchangeProgram &arg) = delete;
public: // properties
public: // operations
void Execute() override;
private: // fields
BufferedExchange::BufferedExchangeComponent &bufferedExchangeComponent;
long int count { 0 };
bool error_LastCycle { false };
public:
//#port
//#attributes(Input)
//#name(retry_sending)
boolean retry{false};
};
///////////////////////////////////////////////////////////////////////////////
// inline methods of class ProgramBase
inline BufferedExchangeProgram::BufferedExchangeProgram(
BufferedExchange::BufferedExchangeComponent &bufferedExchangeComponentArg,
const String &name) :
ProgramBase(name),
bufferedExchangeComponent(bufferedExchangeComponentArg) {
}
} // end of namespace BufferedExchange