beautypg.com

6 failsafe mode – DekTec DTM-3200 IP-ASI Converter User Manual

Page 32

background image

DTM-3200 – OEM Ethernet TSoIP Converter

User Manual

32

{
if(bytes_todo >= 7)
{
*returnData++ = 0x80 + (((*(bin_data + 0)) & (0x7F >> 0) ) << 0);
*returnData++ = 0x80 + (((*(bin_data + 1)) & (0x7F >> 1) ) << 1) + ((*(bin_data + 0) & ~(0x7F >> 0)) >> 7);
*returnData++ = 0x80 + (((*(bin_data + 2)) & (0x7F >> 2) ) << 2) + ((*(bin_data + 1) & ~(0x7F >> 1)) >> 6);
*returnData++ = 0x80 + (((*(bin_data + 3)) & (0x7F >> 3) ) << 3) + ((*(bin_data + 2) & ~(0x7F >> 2)) >> 5);
*returnData++ = 0x80 + (((*(bin_data + 4)) & (0x7F >> 4) ) << 4) + ((*(bin_data + 3) & ~(0x7F >> 3)) >> 4);
*returnData++ = 0x80 + (((*(bin_data + 5)) & (0x7F >> 5) ) << 5) + ((*(bin_data + 4) & ~(0x7F >> 4)) >> 3);
*returnData++ = 0x80 + (((*(bin_data + 6)) & (0x7F >> 6) ) << 6) + ((*(bin_data + 5) & ~(0x7F >> 5)) >> 2);
*returnData++ = 0x80 + ((*(bin_data + 6) & ~(0x7F >> 6)) >> 1);
bytes_todo -= 7;
bin_data += 7;
}
else
{
*returnData++ = 0x80 + (((*(bin_data + 0)) & (0x7F >> 0) ) << 0);
i = 1;
while(bytes_todo > 1)
{
*returnData++ = 0x80 + (((*(bin_data + i)) & (0x7F >> i) ) << i) + ((*(bin_data + (i-1)) & ~(0x7F >> (i-1))) >> (7-(i-1)));

bytes_todo--;
i++;
}
*returnData = 0x80 + ((*(bin_data + (i-1)) & ~(0x7F >> (i-1))) >> (7-(i-1))); //final byte
bytes_todo--;
}
}
if(((len*8)%7) > 0){
return (((len*8)/7) + 1);
}
return ((len*8)/7);
}

4.6 Failsafe mode

The DTM-3200 supports a special “failsafe” mode to enable recovery from an erroneous

configuration. In failsafe mode the unit has no ASI transcoding functionality and the user can only

configure the IP address and load new firmware.
Failsafe mode is entered in the following cases:

A firmware upgrade of the DTM-3200 has failed.

The user selected the failsafe mode through configuration option ‘application’

The normal operation mode can be selected again using configuration option ‘application’.