Template:DeviceTypeName: Difference between revisions

From RadiWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{#ifeq:{{HasBitValueSet|{{{1|0}}}|1}}|1|Signal Generator}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|2}}|1|Amplifier}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|4}}|1|Coupler}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|8}}|1|Power Meter}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|16}}|1|Antenna}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|32}}|1|Field Sensor}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|64}}|1|AD Converter}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|128}}|1|Injection Device}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|256}}|1|Current Sensor}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|512}}|1|Spectrum Analyser}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|1024}}|1|LISN}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|2048}}|1|Calibration Jig}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|4096}}|1|Turn Table}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|8192}}|1|Output Box}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|16384}}|1|Cable}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|32768}}|1|Pre-Amplifier}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|65536}}|1|Climat Chamber}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|131072}}|1|Antenna Tower}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|262144}}|1|ESD Generator}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|524288}}|1|EFT Burst Generator}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|1048576}}|1|Surge Generator}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|2097152}}|1|Absorbing Clamp}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|4194304}}|1|Clamp Positioner}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|8388608}}|1|Switch Matrix}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|16777216}}|1|EUT Controller}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|33554432}}|1|Oscilloscope}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|67108864}}|1|Resistor}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|134217728}}|1|Multimeter}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|268435456}}|1|Network Analyser}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|536870912}}|1|Modulation Source}}{{#ifeq:{{HasBitValueSet|{{{1|0}}}|1073741824}}|1|Voltage, dips and interrupts generator}}<noinclude>
{{CombineWithSeperator|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|1}}|1|Signal Generator}}|, |{{#ifeq:{{HasBitValueSet|{{{1|0}}}|2}}|1|Amplifier}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|4}}|1|Coupler}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|8}}|1|Power Meter}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|16}}|1|Antenna}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|32}}|1|Field Sensor}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|64}}|1|AD Converter}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|128}}|1|Injection Device}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|256}}|1|Current Sensor}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|512}}|1|Spectrum Analyser}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|1024}}|1|LISN}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|2048}}|1|Calibration Jig}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|4096}}|1|Turn Table}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|8192}}|1|Output Box}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|16384}}|1|Cable}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|32768}}|1|Pre-Amplifier}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|65536}}|1|Climat Chamber}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|131072}}|1|Antenna Tower}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|262144}}|1|ESD Generator}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|524288}}|1|EFT Burst Generator}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|1048576}}|1|Surge Generator}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|2097152}}|1|Absorbing Clamp}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|4194304}}|1|Clamp Positioner}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|8388608}}|1|Switch Matrix}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|16777216}}|1|EUT Controller}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|33554432}}|1|Oscilloscope}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|67108864}}|1|Resistor}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|134217728}}|1|Multimeter}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|268435456}}|1|Network Analyser}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|536870912}}|1|Modulation Source}}|{{#ifeq:{{HasBitValueSet|{{{1|0}}}|1073741824}}|1|Voltage, dips and interrupts generator}}}}<noinclude>
Converts the numeric value of a [[DeviceDriverType]] into a nice name
Converts the numeric value of a [[DeviceDriverType]] into a nice name. Combination of several bits into the same value is supported, using the 'HasBitValueSet' function.
 
Only the basic values are detected, bit-combinations will not be splitted into several names! This is because it seems to be very difficult in MediaWiki to implement bit operations (or bitwise comparsion).
 
A possibility is to use a modulation operation of the double of the value, to determine if the value is present.
10 is bitvalue 8 and bitvalue 2. To check if bitvalue 2 is set double the bitvalue, and use it for the a modulo operation. Then with that result, do a modulo operation with the tested bitvalue. If it changes, then the bit was set.
* 10 mod (2 * 2) => 2
* 2 mod 2 => 0
* 0 is different than the 2, so the bitvalue 2 was present in 10.


[[Category:Template]]</noinclude>
[[Category:Template]]</noinclude>

Revision as of 20:50, 28 June 2016

Converts the numeric value of a DeviceDriverType into a nice name. Combination of several bits into the same value is supported, using the 'HasBitValueSet' function.