PC Connections Data Monitoring Logging and Analyzing Software
Device Monitoring Studio - PC Connections Data Monitoring Logging and Analyzing Software

display Attribute

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >

Syntax:


display(expr)
      

This attribute may be used to override the default type's visualization algorithm.

When Device Monitoring Studio generates a value for a collapsed type, it by default displays values of first 5 type's fields. This attribute allows you to change that.

Device Monitoring Studio evaluates the expr expression in the context of the current type (that is, you may reference all type fields directly). The result is then converted to string and displayed in Structure View data visualizer.

The following example renders the user-friendly MAC address:


[display(format("{0b16Xw2arf0}:{1b16Xw2arf0}:{2b16Xw2arf0}:{3b16Xw2arf0}:{4b16Xw2arf0}:{5b16Xw2arf0}",
  data[0],data[1],data[2],data[3],data[4],data[5]))]
struct MAC
{
    unsigned char data[6];
};
      

The following example displays the sum of array's values:


function sum(r)
{
    var sum = r[0];
    for (var i = 1; i < 6; i = i + 1)
        sum = sum + r[i];
    return sum;
}

[display(sum(ref(data)))]
struct MAC
{
    unsigned char data[6];
};
      

See Also

  • Structure View
< PreviousTopNext >
Copyright © 2018 HHD Software. All rights reserved.