Versions in this module Expand all Collapse all v0 v0.1.6 Nov 6, 2024 Changes in this version type Card + func (c *Card) DisconnectEjectCard() error + func (c *Card) DisconnectUnpowerCard() error v0.1.5 Apr 12, 2024 Changes in this version type Card + Reader *Reader + func (c *Card) ATR() ([]byte, error) + func (c *Card) ATS() ([]byte, error) + func (c *Card) Apdu(apdu []byte) ([]byte, error) + func (c *Card) DisconnectCard() error + func (c *Card) DisconnectResetCard() error + func (c *Card) EndTransactionResetCard() error + func (c *Card) GetData(data byte) ([]byte, error) + func (c *Card) SAK() byte + func (c *Card) UID() ([]byte, error) type ErrorCode + func (e ErrorCode) Code() byte + type ICard interface + Switch1444_3 func() ([]byte, error) + Switch1444_4 func() ([]byte, error) type Reader + ModeProtocol int + func (r *Reader) ConnectCard() (smartcard.ICard, error) + func (r *Reader) ConnectLegacyCard() (*Card, error) + func (r *Reader) ConnectMifareClassic() (mifare.Classic, error) + func (r *Reader) ConnectSamCard() (smartcard.ICard, error) + func (r *Reader) ConnectSamCard_T0() (smartcard.ICard, error) + func (r *Reader) ConnectSamCard_Tany() (smartcard.ICard, error) type SendMode + const NA v0.1.4 Aug 17, 2022 v0.1.3 Aug 17, 2022 v0.1.2 Aug 5, 2022 v0.1.1 Jun 23, 2022 v0.1.0 Jun 23, 2022 Changes in this version + const AsciiMode + const Authenticationfailed + const BaudRate + const BinaryMode + const Generalfailure + const Loginsucess + const Notaginfield + const OpMode + const Operationmodefailure + const Outofrange + const ProtocolConf1 + const ProtocolConf2 + const ProtocolConf3 + const ResetCoveryTime + const ResetOffTime + const TMRhigh + const TMRlow + var ErrDisconnectCard = errors.New("don't Connect to Card") + func MifareClassic(c smartcard.ICard) (mifare.Classic, error) + type BadChecsum []byte + func (e BadChecsum) Error() string + type BadResponse []byte + func (e BadResponse) Error() string + type Card interface + Switch1444_3 func() ([]byte, error) + Switch1444_4 func() ([]byte, error) + type Device struct + Ok bool + func NewDevice(portName string, baudRate int, timeout time.Duration) (*Device, error) + func (dev *Device) Close() bool + func (dev *Device) Recv() ([]byte, error) + func (dev *Device) Send(data []byte) (int, error) + func (dev *Device) SendRecv(data []byte) ([]byte, error) + type ErrorCode byte + func (e ErrorCode) Error() string + type NilResponse int + func (e NilResponse) Error() string + type Reader interface + GetRegister func(register byte) ([]byte, error) + SendAPDU1443_4 func(data []byte) ([]byte, error) + SendDataFrameTransfer func([]byte) ([]byte, error) + SendSAMDataFrameTransfer func(data []byte) ([]byte, error) + SetChainning func(chainning bool) + SetModeProtocol func(mode int) + SetRegister func(register byte, data []byte) error + T1TransactionV2 func(data []byte) ([]byte, error) + Transmit func([]byte, []byte) ([]byte, error) + TransmitAscii func([]byte, []byte) ([]byte, error) + TransmitBinary func([]byte, []byte) ([]byte, error) + func NewMifareClassicReader(dev *Device, readerName string, idx int) Reader + func NewReader(dev *Device, readerName string, idx int) Reader + type SendMode int + const APDU1443_4 + const T1TransactionV2 + type State int + const CONNECTED + const DISCONNECTED + type TransmitProto int + const T0 + const T1