Fix mbus_vib_unit_lookup

remove unreachable code
add missing unit password
fix typo

Signed-off-by: Stefan Wahren <info@lategoodbye.de>
This commit is contained in:
Stefan Wahren 2013-08-03 16:35:09 +02:00
parent c8aaa8dc32
commit d9dd055bea

View File

@ -2072,6 +2072,11 @@ mbus_vib_unit_lookup(mbus_value_information_block *vib)
// E000 1101 // E000 1101
snprintf(buff, sizeof(buff), "Software version"); snprintf(buff, sizeof(buff), "Software version");
} }
else if (vib->vife[0] == 0x16)
{
// VIFE = E001 0110 Password
snprintf(buff, sizeof(buff), "Password");
}
else if (vib->vife[0] == 0x17 || vib->vife[0] == 0x97) else if (vib->vife[0] == 0x17 || vib->vife[0] == 0x97)
{ {
// VIFE = E001 0111 Error flags // VIFE = E001 0111 Error flags
@ -2082,11 +2087,6 @@ mbus_vib_unit_lookup(mbus_value_information_block *vib)
// VIFE = E001 0000 Customer location // VIFE = E001 0000 Customer location
snprintf(buff, sizeof(buff), "Customer location"); snprintf(buff, sizeof(buff), "Customer location");
} }
else if (vib->vife[0] == 0x0C)
{
// E000 1100 Model / Version
snprintf(buff, sizeof(buff), "Model / Version");
}
else if (vib->vife[0] == 0x11) else if (vib->vife[0] == 0x11)
{ {
// VIFE = E001 0001 Customer // VIFE = E001 0001 Customer
@ -2102,16 +2102,6 @@ mbus_vib_unit_lookup(mbus_value_information_block *vib)
// VIFE = E001 1011 Digital input (binary) // VIFE = E001 1011 Digital input (binary)
snprintf(buff, sizeof(buff), "Digital input (binary)"); snprintf(buff, sizeof(buff), "Digital input (binary)");
} }
else if (vib->vife[0] == 0x09)
{
// VIFE = E001 0110 Password
snprintf(buff, sizeof(buff), "Password");
}
else if (vib->vife[0] == 0x0B)
{
// VIFE = E000 1011 Parameter set identification
snprintf(buff, sizeof(buff), "Parameter set identification");
}
else if ((vib->vife[0] & 0x70) == 0x40) else if ((vib->vife[0] & 0x70) == 0x40)
{ {
// VIFE = E100 nnnn 10^(nnnn-9) V // VIFE = E100 nnnn 10^(nnnn-9) V
@ -2131,7 +2121,7 @@ mbus_vib_unit_lookup(mbus_value_information_block *vib)
} }
else else
{ {
snprintf(buff, sizeof(buff), "Unrecongized VIF extension: 0x%.2x", vib->vife[0]); snprintf(buff, sizeof(buff), "Unrecognized VIF extension: 0x%.2x", vib->vife[0]);
} }
return buff; return buff;
} }