Table of Contents

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 IAsciiCommandResponder

The responder to update

commandLine string

The 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 SwitchActionCommand

The command to update

triggerIndex int

The trigger to configure. 1 for single press, 2 for double press

action SwitchAction

The 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 int

The trigger to configure. 1 for single press, 2 for double press

triggerCommandLine string

The 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 AsciiCommandBase

The command to use for CommandName

triggerIndex int

The 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 int

The index of the trigger

Returns

string

Text to represent the triggerIndex