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
responder
IAsciiCommandResponderThe responder to update
commandLine
stringThe 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
command
SwitchActionCommandThe command to update
triggerIndex
intThe trigger to configure. 1 for single press, 2 for double press
action
SwitchActionThe 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
triggerIndex
intThe trigger to configure. 1 for single press, 2 for double press
triggerCommandLine
stringThe 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
command
AsciiCommandBaseThe command to use for CommandName
triggerIndex
intThe 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
triggerIndex
intThe index of the trigger
Returns
- string
Text to represent the triggerIndex