Class AsciiCommandExtensions
- Namespace
- TechnologySolutions.Rfid.AsciiOperations
- Assembly
- TechnologySolutions.Rfid.Operations.dll
Extension methods to generate TechnologySolutions.Rfid.AsciiProtocol.Commands from TagAccessFilterFields and TagFilterFields
public static class AsciiCommandExtensions
- Inheritance
-
AsciiCommandExtensions
- Inherited Members
Methods
ApplyAntennaBounds<TAsciiCommand>(TAsciiCommand, IAntennaParameterBounds)
Updates the command's minimum and maximum output power limits to the bounds specified
public static TAsciiCommand ApplyAntennaBounds<TAsciiCommand>(this TAsciiCommand command, IAntennaParameterBounds bounds) where TAsciiCommand : IAntennaParameterCommandBounds
Parameters
command
TAsciiCommandThe command on which to set the limits
bounds
IAntennaParameterBoundsThe limits to apply
Returns
- TAsciiCommand
The command with the limits set to bounds
Type Parameters
TAsciiCommand
A command with IAntennaParameterCommandBounds
ApplyAntennaBounds<TAsciiCommand>(TAsciiCommand, IReaderConfiguration)
Updates the command's minimum and maximum output power limits to the bounds specified
public static TAsciiCommand ApplyAntennaBounds<TAsciiCommand>(this TAsciiCommand command, IReaderConfiguration bounds) where TAsciiCommand : IAntennaParameterCommandBounds
Parameters
command
TAsciiCommandThe command on which to set the limits
bounds
IReaderConfigurationThe limits to apply
Returns
- TAsciiCommand
The command with the limits set to bounds
Type Parameters
TAsciiCommand
A command with IAntennaParameterCommandBounds
ApplyAntenna<TAsciiCommand>(TAsciiCommand, TagFilter)
Sets OutputPower from the value OutputPower
public static TAsciiCommand ApplyAntenna<TAsciiCommand>(this TAsciiCommand antenna, TagFilter filter) where TAsciiCommand : IAntennaParameters
Parameters
antenna
TAsciiCommandThe command to update
filter
TagFilterThe filter that specifies the output power
Returns
- TAsciiCommand
The command with the updated output power
Type Parameters
TAsciiCommand
The command with an OutputPower parameter
ApplyQuery<TAsciiCommand>(TAsciiCommand, TagFilter)
Configures the IQueryParameters of the ASCII command based on the filter
public static TAsciiCommand ApplyQuery<TAsciiCommand>(this TAsciiCommand query, TagFilter filter) where TAsciiCommand : IQueryParameters
Parameters
query
TAsciiCommandThe command to configure
filter
TagFilterThe filter to apply
Returns
- TAsciiCommand
The command configured with the specified filter
Type Parameters
TAsciiCommand
A command that supports IQueryParameters
ApplyReport<TAsciiCommand>(TAsciiCommand, TagFields)
Configures the fields of the TransponderData that are populated based on the ITransponderParameters. Configures the ITransponderParameters of the ASCII Command based on the fields specified
public static TAsciiCommand ApplyReport<TAsciiCommand>(this TAsciiCommand include, TagFields fields) where TAsciiCommand : ITransponderParameters
Parameters
include
TAsciiCommandThe command to configure
fields
TagFieldsThe fields to specify
Returns
- TAsciiCommand
The command configured to return the fields specified
Type Parameters
TAsciiCommand
A command that supports ITransponderParameters
ApplySelect(FindTagCommand, TagFilter)
Applies the Bank, Mask, Length and Offset form filter to the find tag command
public static FindTagCommand ApplySelect(this FindTagCommand select, TagFilter filter)
Parameters
select
FindTagCommandThe command to update
filter
TagFilterThe filter to apply
Returns
- FindTagCommand
The command updated with the filter
Remarks
The rest of the filter is configured for us by the command so we just take the fields we need to add
ApplySelect<TAsciiCommand>(TAsciiCommand, TagFilter)
Configures the ISelectParameters of the ASCII command based on the filter
public static TAsciiCommand ApplySelect<TAsciiCommand>(this TAsciiCommand select, TagFilter filter) where TAsciiCommand : ISelectParameters
Parameters
select
TAsciiCommandThe command to configure
filter
TagFilterThe filter to apply
Returns
- TAsciiCommand
The command configured for the specified filter
Type Parameters
TAsciiCommand
A command that supports ISelectParameters to configure
ToDatabank(MemoryBank)
Converts a MemoryBank to a Databank
public static Databank ToDatabank(this MemoryBank memory)
Parameters
memory
MemoryBankThe value to convert
Returns
- Databank
The equivalent value
ToInventory(TagFilterFields, IAntennaParameterBounds)
Returns the equivalent InventoryCommand for specified TagFilterFields
public static InventoryCommand ToInventory(this TagFilterFields filterFields, IAntennaParameterBounds bounds = null)
Parameters
filterFields
TagFilterFieldsThe transponders to return and the fields to report
bounds
IAntennaParameterBoundsSets the output power bounds to the permitted range before setting the output power
Returns
- InventoryCommand
The inventory command equivalent to filterFields
ToInventory(TagFilterFields, IReaderConfiguration)
Returns the equivalent InventoryCommand for specified TagFilterFields
public static InventoryCommand ToInventory(this TagFilterFields filterFields, IReaderConfiguration bounds)
Parameters
filterFields
TagFilterFieldsThe transponders to return and the fields to report
bounds
IReaderConfigurationSets the output power bounds to the permitted range before setting the output power
Returns
- InventoryCommand
The inventory command equivalent to filterFields
ToPasswordHex(int)
Converts a 32 bit password value to the ASCII Protocol equivalent
public static string ToPasswordHex(this int password)
Parameters
password
intThe value to convert
Returns
- string
The converted value
ToSelectTarget(int)
Converts a Session to a SelectTarget
public static SelectTarget ToSelectTarget(this int session)
Parameters
session
intThe session flag to convert
Returns
- SelectTarget
The select target
ToTagAccessCommand(TagAccessFilterFields, IAntennaParameterBounds)
Returns the equivalent ASCII 2 Protocol Tag Access command for the access specification
public static TranspondersCommandBase ToTagAccessCommand(this TagAccessFilterFields access, IAntennaParameterBounds bounds = null)
Parameters
access
TagAccessFilterFieldsThe access command, transponder filter and fields to report
bounds
IAntennaParameterBoundsThe output power bounds to use
Returns
- TranspondersCommandBase
The equivalent ASCII 2 Protocol tag access command for access
ToTriState(TagFields, bool)
Returns a TriState based on flagsValue > 0
public static TriState? ToTriState(this TagFields flagsValue, bool defaultValue)