Class SwitchActionExtensions
- Namespace
- TechnologySolutions.Rfid.AsciiOperations
- Assembly
- TechnologySolutions.Rfid.Operations.dll
Extension methods to configure the switch actions
public static class SwitchActionExtensions
- Inheritance
-
SwitchActionExtensions
- Inherited Members
Methods
MatchCommandLine(IAsciiCommandResponder, string)
Updates responder so that it only captures the response to commandLine. Sets responder.MatchCommandLine to commandLine
public static void MatchCommandLine(this IAsciiCommandResponder responder, string commandLine)
Parameters
responderIAsciiCommandResponderThe responder to update
commandLinestringThe command line to respond to
SetAction(SwitchActionCommand, int, SwitchAction)
Sets the action for the specified triggerIndex
public static SwitchActionCommand SetAction(this SwitchActionCommand command, int triggerIndex, SwitchAction action)
Parameters
commandSwitchActionCommandThe command to update
triggerIndexintThe trigger to configure. 1 for single press, 2 for double press
actionSwitchActionThe action to configure
Returns
- SwitchActionCommand
The command with the updated configuration
SwitchPressUserAction(int, string)
Returns a command to configure the user action (triggerCommandLine) for the specified triggerIndex
public static AsciiCommandBase SwitchPressUserAction(this int triggerIndex, string triggerCommandLine)
Parameters
triggerIndexintThe trigger to configure. 1 for single press, 2 for double press
triggerCommandLinestringThe user command line to run for the trigger press
Returns
- AsciiCommandBase
The command to configure the user triggerCommandLine for the specified trigger index
TriggerCommandLine(AsciiCommandBase, int)
Returns a command line to action the trigger for the specified index e.g. ".iv SP" or ".bc DP"
public static string TriggerCommandLine(this AsciiCommandBase command, int triggerIndex)
Parameters
commandAsciiCommandBaseThe command to use for CommandName
triggerIndexintThe index of the trigger
Returns
- string
A command line to run command identifying the trigger
TriggerTag(int)
Returns "SP" for 1 and "DP" for 2.
public static string TriggerTag(this int triggerIndex)
Parameters
triggerIndexintThe index of the trigger
Returns
- string
Text to represent the triggerIndex