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
|
//---------------------------------------------------------------------------
int AccesDataRead(int iVal)
{
int iIndex = -1;
int iReturn;
//Fonction retourant la valeur du MW iVal ou -1 si le MW n'est pas lue
iIndex = Form1->slListMWRead->IndexOf(IntToStr(iVal));
if(iIndex != -1)
iReturn = Form1->TabValeurIndex[iIndex];
else
iReturn = -1;
return iReturn;
}
//---------------------------------------------------------------------------
int AccesDataRead(int iVal, int iBit)
{
int iValRetourner = -1;
iValRetourner = AccesDataRead(iVal);
if(iValRetourner != -1)
{
if((iValRetourner>>iBit)& 0x01)
return 1;
else
return 0;
}
else
return -1;
} |
Partager