SpringCard Smart Readers library for .NET  19.9.20
Communicate and manage SpringCard Smart Reader devices
SpringCard.SmartReader.Mk2Link.Mk2Protocol Class Reference

The Mk2Protocol class and sub-classes expose the SpringCard "MK2" Network Device Protocol. More...

Classes

class  DeviceToHostBlock
 Class to receive an process a block coming from a Device. More...
 
class  HostToDeviceBlock
 Class to send a block from the Host to a Device. More...
 
class  ProtocolBlock
 Abstract class to group the HostToDevice and DeviceToHost sub-classes. More...
 

Public Types

enum  EChannel { EChannel.Serial = 0x00, EChannel.NetworkTcp = 0x01, EChannel.NetworkUdp = 0x02 }
 Supported communication channel. More...
 
enum  BlockType : byte {
  BlockType.I = 0x00, BlockType.I_Chaining = 0x10, BlockType.I_S = 0x20, BlockType.I_S_Chaining = 0x30,
  BlockType.Helo = 0x40, BlockType.Helo_OK = 0x50, BlockType.Helo_Auth = 0x70, BlockType.Mask = 0x70,
  BlockType.DeviceToHost = 0x80
}
 Type of blocks. More...
 
enum  BlockFlag : byte { BlockFlag.HasMacAddress = 0x01, BlockFlag.HasSequence = 0x02, BlockFlag.HasChecksum = 0x04 }
 Flags for UDP blocks. More...
 
enum  HostToDeviceTag : ushort {
  HostToDeviceTag.GetGlobalStatus = 0x00, HostToDeviceTag.GetDeviceName = 0x01, HostToDeviceTag.GetDeviceCapabilities = 0x02, HostToDeviceTag.GetDeviceSerialNumber = 0x03,
  HostToDeviceTag.ReadInputs = 0x04, HostToDeviceTag.RepeatReaderEvent = 0x09, HostToDeviceTag.SetRuntimeMode = 0x0A, HostToDeviceTag.Reset = 0x0B,
  HostToDeviceTag.WriteConfig = 0x0C, HostToDeviceTag.AlterConfig = 0x0D, HostToDeviceTag.SetOutput = 0x9000, HostToDeviceTag.ClearOutput = 0xA000,
  HostToDeviceTag.SetLeds = 0xD000, HostToDeviceTag.SetBuzzer = 0xD100
}
 Definition of the T,L,V commands (Host to Device direction) More...
 
enum  DeviceToHostTag : ushort {
  DeviceToHostTag.DeviceName = 0x01, DeviceToHostTag.DeviceCapabilities = 0x02, DeviceToHostTag.DeviceSerialNumber = 0x03, DeviceToHostTag.ReaderSequenceDone = 0x0A,
  DeviceToHostTag.Tampers = 0x2F, DeviceToHostTag.ReaderHeadName = 0x8100, DeviceToHostTag.PinEntered = 0xA000, DeviceToHostTag.TagRead = 0xB000,
  DeviceToHostTag.TagInsertOrRemove = 0xB100, DeviceToHostTag.InputChange = 0xC000
}
 Definition of the T,L,V responses and events (Device to Host direction) More...
 

Static Public Member Functions

static bool GetHostToDeviceTagValue (string strT, out HostToDeviceTag T)
 Translate a human-readable string into the corresponding HostToDeviceTag value. More...
 
static string GetHostToDeviceTagName (ushort T)
 Translate a HostToDeviceTag value into a human-readable string. More...
 
static string GetDeviceToHostTagName (ushort T)
 Translate a DeviceToHostTag value into a human-readable string. More...
 
static byte [] CreateFrame (byte type, byte[] payload)
 
static byte [] CreateFrameSecure (byte type, byte[] payload)
 

Detailed Description

The Mk2Protocol class and sub-classes expose the SpringCard "MK2" Network Device Protocol.

Member Enumeration Documentation

◆ BlockFlag

Flags for UDP blocks.

Enumerator
HasMacAddress 

6-byte MAC address included before the payload

HasSequence 

8-byte sequence number included before the payload

HasChecksum 

4-byte CRC32 included after the payload

◆ BlockType

Type of blocks.

Enumerator

I-Block without chaining

I_Chaining 

I-Block with chaining

I_S 

IS-Block without chaining

I_S_Chaining 

IS-Block with chaining

Helo 

H-Block, HELO

Helo_OK 

H-Block, HELO-OK

Helo_Auth 

H-Block, HELO-AUTH

Mask 

Block type mask

DeviceToHost 

Block direction flag

◆ DeviceToHostTag

Definition of the T,L,V responses and events (Device to Host direction)

Enumerator
DeviceName 

Response: Device name

DeviceCapabilities 

Response: Device capabilities

DeviceSerialNumber 

Response: Device serial number

ReaderSequenceDone 

Event: Device is back to idle runlevel

Tampers 

Event: Tamper(s) changed

ReaderHeadName 

Response: Reader name

PinEntered 

Event: a PIN-code has been entered

TagRead 

Event: a Tag has been read

TagInsertOrRemove 

Event: a Tag has been read and the reader is configured for insert/remove mode

InputChange 

Event: the Tag has been removed

◆ EChannel

Supported communication channel.

Enumerator
Serial 

Serial (RS-485 typically)

NetworkTcp 

TCP over IP

NetworkUdp 

UDP over IP

◆ HostToDeviceTag

Definition of the T,L,V commands (Host to Device direction)

Enumerator
GetGlobalStatus 

Get global status

GetDeviceName 

Get Device name

GetDeviceCapabilities 

Get Device capabilities

GetDeviceSerialNumber 

Get Device serial number

ReadInputs 

Read Device's input lines

RepeatReaderEvent 

Ask device to repeat the last reader event (Tag read or insert/remove)

SetRuntimeMode 

Set Device's runlevel

Reset 

Reset the Device

WriteConfig 

Write a configuration register in the Device (IWM2 version)

AlterConfig 

Dynamically change a configuration register (not persistent) (IWM2 version)

SetOutput 

Set a Device's output line at high (active) level

ClearOutput 

Set a Device's output line at low (inactive) level

SetLeds 

Drive the Device's LEDs

SetBuzzer 

Drive the Device's buzzer

Member Function Documentation

◆ GetDeviceToHostTagName()

static string SpringCard.SmartReader.Mk2Link.Mk2Protocol.GetDeviceToHostTagName ( ushort  T)
static

Translate a DeviceToHostTag value into a human-readable string.

◆ GetHostToDeviceTagName()

static string SpringCard.SmartReader.Mk2Link.Mk2Protocol.GetHostToDeviceTagName ( ushort  T)
static

Translate a HostToDeviceTag value into a human-readable string.

◆ GetHostToDeviceTagValue()

static bool SpringCard.SmartReader.Mk2Link.Mk2Protocol.GetHostToDeviceTagValue ( string  strT,
out HostToDeviceTag  T 
)
static

Translate a human-readable string into the corresponding HostToDeviceTag value.


The documentation for this class was generated from the following files: