71 lines
2.1 KiB
Plaintext
71 lines
2.1 KiB
Plaintext
/*
|
|
* Array's. This function library makes it possible to work arrays.
|
|
* Its possible to use both String, Int and Object arrays
|
|
*/
|
|
|
|
object GetLocalArrayObject(object oidObject, string sVarName, int nVarNum)
|
|
{
|
|
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
|
return GetLocalObject(oidObject, sFullVarName);
|
|
}
|
|
|
|
void SetLocalArrayObject(object oidObject, string sVarName, int nVarNum, object oObject)
|
|
{
|
|
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
|
SetLocalObject(oidObject, sFullVarName, oObject);
|
|
}
|
|
|
|
string GetLocalArrayString(object oidObject, string sVarName, int nVarNum)
|
|
{
|
|
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
|
return GetLocalString(oidObject, sFullVarName);
|
|
}
|
|
|
|
void SetLocalArrayString(object oidObject, string sVarName, int nVarNum, string nValue)
|
|
{
|
|
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
|
SetLocalString(oidObject, sFullVarName, nValue);
|
|
}
|
|
|
|
int GetLocalArrayInt(object oidObject, string sVarName, int nVarNum)
|
|
{
|
|
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
|
return GetLocalInt(oidObject, sFullVarName);
|
|
}
|
|
|
|
void SetLocalArrayInt(object oidObject, string sVarName, int nVarNum, int nValue)
|
|
{
|
|
string sFullVarName = sVarName + IntToString(nVarNum) ;
|
|
SetLocalInt(oidObject, sFullVarName, nValue);
|
|
}
|
|
|
|
int GLOBALGetItemTimestampHour(object oidObject)
|
|
{
|
|
string sFullVarName = GetTag(oidObject);
|
|
sFullVarName = sFullVarName + "_TimeStampHour";
|
|
return GetLocalInt(GetModule(), sFullVarName);
|
|
}
|
|
|
|
void GLOBALSetItemTimestampHour(object oidObject, int iHour)
|
|
{
|
|
string sFullVarName = GetTag(oidObject);
|
|
sFullVarName = sFullVarName + "_TimeStampHour";
|
|
SetLocalInt(GetModule(), sFullVarName, iHour);
|
|
}
|
|
|
|
int GLOBALGetItemTimestampMinute(object oidObject)
|
|
{
|
|
string sFullVarName = GetTag(oidObject);
|
|
sFullVarName = sFullVarName + "_TimeStampMinute";
|
|
return GetLocalInt(GetModule(), sFullVarName);
|
|
}
|
|
|
|
void GLOBALSetItemTimestampMinute(object oidObject, int iMinute)
|
|
{
|
|
string sFullVarName = GetTag(oidObject);
|
|
sFullVarName = sFullVarName + "_TimeStampMinute";
|
|
SetLocalInt(GetModule(), sFullVarName, iMinute);
|
|
}
|
|
|
|
|