#include <rlplc.h>
List of all members.
Detailed Description
Definition at line 21 of file rlplc.h.
Constructor & Destructor Documentation
| rlPlcState::rlPlcState |
( |
int |
numInt = 100, |
|
|
int |
numFloat = 100, |
|
|
int |
numDouble = 0 |
|
) |
| |
Definition at line 19 of file rlplc.cpp.
{
max_int = numInt;
if(max_int <= 0) max_int = 1;
max_float = numFloat;
if(max_float <= 0) max_float = 1;
max_double = numDouble;
if(max_double <= 0) max_double = 1;
i = new int[max_int];
i_old = new int[max_int];
f = new float[max_float];
f_old = new float[max_float];
d = new double[max_double];
d_old = new double[max_double];
memset(i ,0,sizeof(int)*max_int);
memset(i_old,0,sizeof(int)*max_int);
memset(f ,0,sizeof(float)*max_float);
memset(f_old,0,sizeof(float)*max_float);
memset(d ,0,sizeof(double)*max_double);
memset(d_old,0,sizeof(double)*max_double);
}
| rlPlcState::~rlPlcState |
( |
| ) |
[virtual] |
Member Function Documentation
| void rlPlcState::clear |
( |
int |
index, |
|
|
int |
bit |
|
) |
| |
Definition at line 145 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return;
i[index] = i[index] & ~bit;
}
| double rlPlcState::deltaDouble |
( |
int |
index | ) |
|
| float rlPlcState::deltaFloat |
( |
int |
index | ) |
|
| int rlPlcState::deltaInt |
( |
int |
index | ) |
|
| int rlPlcState::doubleChanged |
( |
int |
index | ) |
|
Definition at line 72 of file rlplc.cpp.
{
if(index<0 || index >= max_double) return 0;
if(d[index] == d_old[index]) return 0;
else return 1;
}
| int rlPlcState::doubleHasDecreased |
( |
int |
index | ) |
|
Definition at line 114 of file rlplc.cpp.
{
if(index<0 || index >= max_double) return 0;
if(d[index] < d_old[index]) return 1;
else return 0;
}
| int rlPlcState::doubleHasIncreased |
( |
int |
index | ) |
|
Definition at line 93 of file rlplc.cpp.
{
if(index<0 || index >= max_double) return 0;
if(d[index] > d_old[index]) return 1;
else return 0;
}
| int rlPlcState::floatChanged |
( |
int |
index | ) |
|
Definition at line 65 of file rlplc.cpp.
{
if(index<0 || index >= max_float) return 0;
if(f[index] == f_old[index]) return 0;
else return 1;
}
| int rlPlcState::floatHasDecreased |
( |
int |
index | ) |
|
Definition at line 107 of file rlplc.cpp.
{
if(index<0 || index >= max_float) return 0;
if(f[index] < f_old[index]) return 1;
else return 0;
}
| int rlPlcState::floatHasIncreased |
( |
int |
index | ) |
|
Definition at line 86 of file rlplc.cpp.
{
if(index<0 || index >= max_float) return 0;
if(f[index] > f_old[index]) return 1;
else return 0;
}
| int rlPlcState::hasBeenCleared |
( |
int |
index, |
|
|
int |
bit |
|
) |
| |
Definition at line 176 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return 0;
if((i[index] & bit) == 0)
{
if((i_old[index] & bit) == 0) return 0;
else return 1;
}
return 0;
}
| int rlPlcState::hasBeenSet |
( |
int |
index, |
|
|
int |
bit |
|
) |
| |
Definition at line 165 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return 0;
if(i[index] & bit)
{
if(i_old[index] & bit) return 0;
else return 1;
}
return 0;
}
| int rlPlcState::intChanged |
( |
int |
index | ) |
|
Definition at line 58 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return 0;
if(i[index] == i_old[index]) return 0;
else return 1;
}
| int rlPlcState::intHasDecreased |
( |
int |
index | ) |
|
Definition at line 100 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return 0;
if(i[index] < i_old[index]) return 1;
else return 0;
}
| int rlPlcState::intHasIncreased |
( |
int |
index | ) |
|
Definition at line 79 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return 0;
if(i[index] > i_old[index]) return 1;
else return 0;
}
| int rlPlcState::isClear |
( |
int |
index, |
|
|
int |
bit |
|
) |
| |
Definition at line 158 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return 0;
if(i[index] & bit) return 0;
else return 1;
}
| int rlPlcState::isSet |
( |
int |
index, |
|
|
int |
bit |
|
) |
| |
Definition at line 151 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return 0;
if(i[index] & bit) return 1;
else return 0;
}
| int rlPlcState::maxDouble |
( |
| ) |
|
| int rlPlcState::maxFloat |
( |
| ) |
|
| int rlPlcState::maxInt |
( |
| ) |
|
| void rlPlcState::rememberState |
( |
| ) |
|
| void rlPlcState::set |
( |
int |
index, |
|
|
int |
bit |
|
) |
| |
Definition at line 139 of file rlplc.cpp.
{
if(index<0 || index >= max_int) return;
i[index] = i[index] | bit;
}
Member Data Documentation
The documentation for this class was generated from the following files: