Matlab Simulink/LQ_Target_1500S_V4_0_grt_Output/LQ_ODK/src_odk_helpers/ODK_CpuReadData.cpp
bool CODK_CpuReadData::ReadUINT16(const long  byteOffset,  // Buffer index to the data
                                  ODK_UINT16 &value) const // Variable to store the read value
{
    // Verify offset is within data area
    if ((byteOffset < 0) || ((byteOffset + ODK_SIZEBIT16) > m_nBytes))
    {
        return false;
    }

    // Read, convert, and return the data
    ODK_UINT16 word = reinterpret_cast<ODK_UINT16&>(m_data[byteOffset]);
    value = (((word & 0x00FFU) << 8) |
             ((word & 0xFF00U) >> 8));

    return true;
}
//
// ReadUINT16 : Reads a generic 16-bit value from the data area. Used by public read methods
//
ReadUINT16 : Reads a generic 16-bit value from the data area. Used by public read methods
ReadUINT16 : Reads a generic 16 - bit value from the data area . Used by public read methods
bool CODK_CpuReadData::ReadUINT16(const long  byteOffset,  
                                  ODK_UINT16 &value) const 
{
    if ((byteOffset < 0) || ((byteOffset + ODK_SIZEBIT16) > m_nBytes))
    {
        return false;
    }
    ODK_UINT16 word = reinterpret_cast<ODK_UINT16&>(m_data[byteOffset]);
    value = (((word & 0x00FFU) << 8) |
             ((word & 0xFF00U) >> 8));
    return true;
}
bool CODK_CpuReadData :: ReadUINT16 ( const long byteOffset , ODK_UINT16 & value ) const { if ( ( byteOffset < 0 ) || ( ( byteOffset + ODK_SIZEBIT16 ) > m_nBytes ) ) { return false ; } ODK_UINT16 word = reinterpret_cast < ODK_UINT16 & > ( m_data [ byteOffset ] ) ; value = ( ( ( word & 0x00FFU ) << 8 ) | ( ( word & 0xFF00U ) >> 8 ) ) ; return true ; }
ReadUINT16 : Reads a generic 16-bit value from the data area.
ReadUINT16 : Reads a generic 16 - bit value from the data area .
// Buffer index to the data // Variable to store the read value // Verify offset is within data area // Read, convert, and return the data