Template:G7/Command Link

From ZaberWiki
Jump to navigation Jump to search

Autogenerates the correct links for a device command for both protocols. Takes the following parameters:

  • ASCII - the ASCII command name (e.g. 'home' or 'system reset') (required)
  • Binary - the optional Binary command number (e.g. '1' or '0'). If Binary is not specified or empty only the ASCII command link will be rendered.
  • Value - If present, Value will be appended to the ASCII and Binary commands.
  • CR - if set to 1, a carriage return will be appended to the ASCII command.
  • linktext - if present, the ASCII command link text will be replaced with linktext, otherwise the ascii command will be used.

{{G7/Command_Link|ASCII=home|Binary=0|Value=99}} -> home 99 (T:0:99) (for specifying the binary command and data)

{{G7/Command_Link|ASCII=get|linktext=get pos|Binary=60}} -> get pos (T:60) (for specifying the text to display where the command includes a parameter that isn't part of the command itself. Here the command is simply 'get')

{{G7/Command_Link|ASCII=home|Binary=0}} -> home (T:0) (just specifying the binary command)

{{G7/Command_Link|ASCII=home}} -> home (no equivalent binary command)