Template:API Function

From OptiWiki

Jump to: navigation, search
Availability {{{availability}}}
Description
N/A
Syntax
N/A
Arguments None
Returns None
Remarks {{{remarks}}}
Example {{{example}}}

This template allows to add function prototype layout in wikipedia.

Required parameters

syntax
The function declaration
description
The description of the function.

If a required parameter is not entered, the parameter will be shown in the infobox, with value N/A

Optional parameters

availability
The products on which this function applies
arguments
The parameters passed to the function
returns
The returning parameter
remarks
Additional remarks on the function or its parameters
example
Example code do demonstrate its use

Examples

{{API Function
  |syntax = <source lang="c">void autopowerdown(int command, unsigned long time);</source>
  |description = Terminals can switch themselves off after a certain, user programmable time. This feature is called automatic power down. Every time when the user presses a key, or when the communications port receives data, the count down for automatic power down is reset. With the autopowerdown() function some parameters for this feature are controlled.
  |availability = All terminals
  |arguments = {{API Function Argument|command|The action that autopowerdown() must perform.}}{{API Function Argument|time|The time before the terminal powers down automatically}}
  |remarks = time is an unsigned long. The maximum value is 4294967295, approx. 2.5 years. The minimum value is theoretically zero, but the power down time is limited to 3 seconds.
 }}
Availability All terminals
Description Terminals can switch themselves off after a certain, user programmable time. This feature is called automatic power down. Every time when the user presses a key, or when the communications port receives data, the count down for automatic power down is reset. With the autopowerdown() function some parameters for this feature are controlled.
Syntax
void autopowerdown(int command, unsigned long time);
Arguments
command

The action that autopowerdown() must perform.

time

The time before the terminal powers down automatically

Returns None
Remarks time is an unsigned long. The maximum value is 4294967295, approx. 2.5 years. The minimum value is theoretically zero, but the power down time is limited to 3 seconds.


Views
Personal tools