Matlab Simulink/LQ_Target_1500S_V4_0_grt_Output/LQ_ODK/src_odk_helpers/ODK_CpuReadData.cpp
bool CODK_CpuReadData::CheckS7S5Time(const ODK_UINT16& value) const
{
    ODK_INT8 bcd;

    // check time value
    bcd = GetBCD(value & 0xFF);
    if (bcd < 0  ||  bcd > 99) return false;
    bcd = GetBCD((value >> 8) & 0x0F);
    if (bcd < 0  ||  bcd > 9) return false;
    // check time base is always valid (two bits, four states)

    return true;
}
// return true, when S5Time is in valid range
return true, when S5Time is in valid range
return true when S5Time is in valid range
bool CODK_CpuReadData::CheckS7S5Time(const ODK_UINT16& value) const
{
    ODK_INT8 bcd;
    bcd = GetBCD(value & 0xFF);
    if (bcd < 0  ||  bcd > 99) return false;
    bcd = GetBCD((value >> 8) & 0x0F);
    if (bcd < 0  ||  bcd > 9) return false;
    return true;
}
bool CODK_CpuReadData :: CheckS7S5Time ( const ODK_UINT16 & value ) const { ODK_INT8 bcd ; bcd = GetBCD ( value & 0xFF ) ; if ( bcd < 0 || bcd > 99 ) return false ; bcd = GetBCD ( ( value >> 8 ) & 0x0F ) ; if ( bcd < 0 || bcd > 9 ) return false ; return true ; }
return true, when S5Time is in valid range
return true when S5Time is in valid range
// check time value // check time base is always valid (two bits, four states)