Skip to content
Snippets Groups Projects
Commit f6224601 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

set Field::value = 0 as predefined value and during the output stream generation.

parent 58bf130f
Branches
Tags
No related merge requests found
This diff is collapsed.
......@@ -13,7 +13,7 @@ static FieldType** filedTypeList = 0;
//##ModelId=3C0F6C1A0001
Field::Field(char* n, char* dim, char* prVal, int count) : progressiv(count)
{
value = 0;
//create FieldType list
if(filedTypeList == 0)
{
......
......@@ -316,6 +316,7 @@ char** PartOfPacket::printValue(const char* addString)
//Field* f = (Field*) &(*iter);
Field* f = fields[i];
//sprintf(s, "Name: %s Value: %d\n", f->name.c_str(), f->value);
//cout << "@ " << f->value << endl;
sprintf(s, "%d", f->value);
//s1 = "Name: ";
s1 = "";
......@@ -402,7 +403,7 @@ ByteStream* PartOfPacket::generateStream(bool bigendian)
if(!fields[i]->thereIsPredefinedValue())
wtemp = fields[i]->value;
else
wtemp = fields[i]->getPredefinedValue();
wtemp = fields[i]->value = fields[i]->getPredefinedValue();
dimbit = fields[i]->getDimension();
shift = 16 - dimbit - posbit;
if(shift < 0)
......
1.3.8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment