/* unitno reordering */
if ((unitno >= 0) && (unitno <= 7)) /* case of Tributary interface */
unitno += 8;
else if((unitno >= 8) && (unitno <= 15)) /* case of UP, GBE and TSI interface */
unitno -= 8;
else
unitno = unitno; /* case of MCU and FAN */
if((unitno >= 0) && (unitno <= 5)) /* case of UP and GBE interface */
{
index = unitno;
if(stateMode == cENABLE)
ledstate[index] |= 0x10 >> stateType;
else if(stateMode == cDISABLE)
ledstate[index] &= 0xEF >> stateType;
}
else if((unitno >= 6) && (unitno <= 7)) /* case of TSI interface */
{
index = unitno;
if(stateMode == cENABLE)
ledstate[index] |= 0x20 >> stateType;
else if(stateMode == cDISABLE)
ledstate[index] &= 0xDF >> stateType;
}
else if((unitno >= 8) && (unitno <= 15)) /* case of Tributary interface */
{
index = 8 + ((unitno - 8) * 3);
offset = stateType / 5;
stateType = stateType % 5;