-
Notifications
You must be signed in to change notification settings - Fork 1
/
FzBedingung.cpp
116 lines (104 loc) · 2.13 KB
/
FzBedingung.cpp
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// FzBedingung.cpp: Implementierung der Klasse CFzBedingung.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "stdafx.h"
#include "FzBedingung.h"
#include "macro.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Konstruktion/Destruktion
//////////////////////////////////////////////////////////////////////
CFzBedingung::CFzBedingung()
{
}
CFzBedingung::~CFzBedingung()
{
}
CFzBedingung::CFzBedingung(TYP_FZDAT &tFzDat)
{
m_nMp = tFzDat.mp;
m_nNMp = tFzDat.nmp;
m_nLMp = tFzDat.lmp;
m_nMpPos = tFzDat.mppos;
m_nUEMp = tFzDat.uemp;
m_nZiel = tFzDat.fzziel.nDest;
m_nPos = tFzDat.fzziel.nPos;
if(TEST_AGV_STOP(tFzDat))
{
m_nFV = 1;
}
else
{
m_nFV = 0;
}
}
CFzBedingung::CFzBedingung(CFzBedingung &tBaseBed, CFzBedingung &tBedListe)
{
*this = tBaseBed;
if(tBedListe.m_nFV != 0)
{
m_nFV = tBedListe.m_nFV - 1;
}
if(tBedListe.m_nMp != 0)
{
m_nMp = tBedListe.m_nMp;
}
if(tBedListe.m_nNMp != 0)
{
m_nNMp = tBedListe.m_nNMp;
}
if(tBedListe.m_nLMp != 0)
{
m_nLMp = tBedListe.m_nLMp;
}
if(tBedListe.m_nMpPos != 0)
{
m_nMpPos = tBedListe.m_nMpPos;
}
if(tBedListe.m_nUEMp != 0)
{
m_nUEMp = tBedListe.m_nUEMp;
}
if(tBedListe.m_nZiel != 0)
{
m_nZiel = tBedListe.m_nZiel;
}
if(tBedListe.m_nPos != 0)
{
m_nPos = tBedListe.m_nPos;
}
}
bool CFzBedingung::operator ==(const CFzBedingung &tFzBed) const
{
return( (m_nLMp == tFzBed.m_nLMp) &&
(m_nMp == tFzBed.m_nMp) &&
(m_nMpPos == tFzBed.m_nMpPos) &&
(m_nNMp == tFzBed.m_nNMp) &&
(m_nUEMp == tFzBed.m_nUEMp) &&
(m_nZiel == tFzBed.m_nZiel) &&
(m_nPos == tFzBed.m_nPos) &&
(m_nFV == tFzBed.m_nFV) );
}
CFzBedingung::CFzBedingung(USHORT nLMp,
USHORT nMp,
USHORT nMpPos,
USHORT nNMp,
USHORT nUEMp,
USHORT nZiel,
USHORT nPos,
USHORT nFV)
{
m_nLMp = nLMp;
m_nMp = nMp;
m_nMpPos = nMpPos;
m_nNMp = nNMp;
m_nUEMp = nUEMp;
m_nZiel = nZiel;
m_nPos = nPos;
m_nFV = nFV;
}