{%
    if mode == 0 and math.type(timeout) ~= 'integer' then
        echo('Set fan mode successfully.\n')
        echo('Current Mode:       auto')
    elseif mode == 1 and math.type(timeout) ~= 'integer' then
        echo('Set fan mode successfully.\n')
        echo('Current Mode:       manual\n')
        echo('Time out    :       30 seconds')
    elseif mode == 1 and GetTimeOutValid == true then
        timeout = timeout == 0 and 100000000 or timeout
        echo('Set fan mode successfully.\n')
        echo('Current Mode:       manual\n')
        echo(string.format('Time out    :       %d seconds', timeout))
    elseif mode == 2 and math.type(timeout) ~= 'integer' then
        echo('Set fan mode successfully.\n')
        echo('Current Mode:       mixed')
    else
%}
Usage: ipmcset -d fanmode -v <mode> [timeout]
mode:
    0    auto regulate fan speed, without parameter [timeout]
    1    manual regulate fan speed
         without parameter [timeout], default timeout(30 seconds)
         with parameter [timeout], timeout range <0-100000000>,(0 means max timeout)
{* MixedModeSupported == true and '    2    mixed regulate fan speed, without parameter [timeout]\n' or '' *}
Example:
         ipmcset -d fanmode -v 0
         ipmcset -d fanmode -v 1
         ipmcset -d fanmode -v 1 100{* MixedModeSupported == true and '\n         ipmcset -d fanmode -v 2' or '' *}{% end %}