From: Jan Michel Date: Fri, 20 Dec 2013 15:14:12 +0000 (+0100) Subject: added flag for single-bit fields to get.pl X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=22abc821b1974c38bd4ce375ddab5314c42fc0ed;p=daqtools.git added flag for single-bit fields to get.pl --- diff --git a/xml-db/get.pl b/xml-db/get.pl index 8d99242..d202a32 100755 --- a/xml-db/get.pl +++ b/xml-db/get.pl @@ -161,12 +161,15 @@ sub FormatPretty { $cstr = "" unless $cstr; my $ret, my $cl; if (defined $cont) { - my $isflag = 1; $isflag = 0 if $obj->{noflag}; + my $isflag = 1; + $isflag = 0 if $obj->{noflag}; + my $single = ""; + $single = " single=\"1\"" if (($obj->{format} eq 'bitmask' && $obj->{size} == 1) || $obj->{format} eq 'boolean'); $cl = "class=\"".($value?"bad":"good")."\"" if ( $obj->{errorflag} && !$obj->{invertflag} && $isflag); $cl = "class=\"".($value?"good":"bad")."\"" if ( $obj->{errorflag} && $obj->{invertflag} && $isflag); $cl = "class=\"".($value?"high":"low")."\"" if (!$obj->{errorflag} && !$obj->{invertflag} && $isflag); $cl = "class=\"".($value?"low":"high")."\"" if (!$obj->{errorflag} && $obj->{invertflag} && $isflag); - $cl .= sprintf(" cstr=\"$cstr\" raw=\"0x%x\">
",$rawvalue); + $cl .= sprintf(" cstr=\"$cstr\"%s raw=\"0x%x\">
",$single,$rawvalue); my $t = ""; $ret = "<$cont ";