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
commandTAsciiCommandThe command on which to set the limits
boundsIAntennaParameterBoundsThe limits to apply
Returns
- TAsciiCommand
The command with the limits set to bounds
Type Parameters
TAsciiCommandA 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
commandTAsciiCommandThe command on which to set the limits
boundsIReaderConfigurationThe limits to apply
Returns
- TAsciiCommand
The command with the limits set to bounds
Type Parameters
TAsciiCommandA 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
antennaTAsciiCommandThe command to update
filterTagFilterThe filter that specifies the output power
Returns
- TAsciiCommand
The command with the updated output power
Type Parameters
TAsciiCommandThe 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
queryTAsciiCommandThe command to configure
filterTagFilterThe filter to apply
Returns
- TAsciiCommand
The command configured with the specified filter
Type Parameters
TAsciiCommandA 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
includeTAsciiCommandThe command to configure
fieldsTagFieldsThe fields to specify
Returns
- TAsciiCommand
The command configured to return the fields specified
Type Parameters
TAsciiCommandA 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
selectFindTagCommandThe command to update
filterTagFilterThe 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
selectTAsciiCommandThe command to configure
filterTagFilterThe filter to apply
Returns
- TAsciiCommand
The command configured for the specified filter
Type Parameters
TAsciiCommandA command that supports ISelectParameters to configure
ToDatabank(MemoryBank)
Converts a MemoryBank to a Databank
public static Databank ToDatabank(this MemoryBank memory)
Parameters
memoryMemoryBankThe value to convert
Returns
- Databank
The equivalent value
ToInventory(TagFilterFields, IReaderConfiguration)
Returns the equivalent InventoryCommand for specified TagFilterFields
public static InventoryCommand ToInventory(this TagFilterFields filterFields, IReaderConfiguration bounds = null)
Parameters
filterFieldsTagFilterFieldsThe transponders to return and the fields to report
boundsIReaderConfigurationSets 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
passwordintThe value to convert
Returns
- string
The converted value
ToSelectTarget(int)
Converts a Session to a SelectTarget
public static SelectTarget ToSelectTarget(this int session)
Parameters
sessionintThe session flag to convert
Returns
- SelectTarget
The select target
ToTagAccessCommand(TagAccessFilterFields, IReaderConfiguration)
Returns the equivalent ASCII 2 Protocol Tag Access command for the access specification
public static TranspondersCommandBase ToTagAccessCommand(this TagAccessFilterFields access, IReaderConfiguration bounds = null)
Parameters
accessTagAccessFilterFieldsThe access command, transponder filter and fields to report
boundsIReaderConfigurationThe 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)