X-Git-Url: http://gitweb.hachti.de/?a=blobdiff_plain;f=pc-tools%2Fldc2%2Fsrc%2Fdata_block_0.cpp;h=91a7106955d7cec49e9f8516b8f89e1910a05a2d;hb=16b4d690e1a97837a883abe60d30b5cd032be935;hp=96c4dc2e110ba2d92c641e11a07b99d5fb2c7d87;hpb=97b26985c0190e2fded0f098819a23e892b381f0;p=h316.git diff --git a/pc-tools/ldc2/src/data_block_0.cpp b/pc-tools/ldc2/src/data_block_0.cpp index 96c4dc2..91a7106 100644 --- a/pc-tools/ldc2/src/data_block_0.cpp +++ b/pc-tools/ldc2/src/data_block_0.cpp @@ -1,19 +1,36 @@ #include "data_block_0.hh" -#include "data_block.hh" +/*! + *\brief Specialisation constructor. + */ data_block_0::data_block_0(data_block & org) :data_block(org) { + m_has_known_type=false; } -data_block_0::~data_block_0() -{ -} +/*! + * Determine the block's subtype. + *\return The block's subtype, read from block data. + */ int data_block_0::get_subtype(){ - if ((init_state==TBS_OK)&&word_size&&(data_block::get_type()==0)){ - return (word_data[0]&0x0fc0)>>6; - } - else return data_block::get_subtype(); + return (word_data[0]&0x0fc0)>>6; +} + +/*! + *\brief Describe the block. + *\return A vector of text lines describing this block. + */ +vector data_block_0::get_description(){ + vector result; + char buffer[150]; + sprintf(buffer," (0-%02o) Type 0 data block, unknown\ + subtype, this is an illegal condition!",get_subtype()); + string r_string=buffer; + result.insert(result.end(),r_string); + return result; } + +