Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrInvalidActivationCode = "invalid activation code" ErrRequireConfirmationCode = "confirmation code is required" ErrInvalidDataSize = "invalid data size" CmdUseData = "data" // data$<size in KB> )
View Source
const (
APDUCommunicateTimeout = "6600"
)
Variables ¶
View Source
var ( GSMNumberSign = []byte{0x23} // # GSMDollarSign = []byte{0x02} // $ )
GSM 7-bit encoding, see https://en.wikipedia.org/wiki/GSM_03.38
View Source
var (
ErrConnNotFound = errors.New("conn not found")
)
View Source
var (
ErrTagUnknown = errors.New("unknown tag")
)
View Source
var GSM7CharacterSet = map[rune]byte{
'@': 0x00,
'£': 0x01,
'$': 0x02,
'¥': 0x03,
'_': 0x11,
'!': 0x21,
'#': 0x23,
'%': 0x25,
'&': 0x26,
'(': 0x28,
')': 0x29,
'*': 0x2A,
'+': 0x2B,
',': 0x2C,
'-': 0x2D,
'.': 0x2E,
'/': 0x2F,
':': 0x3A,
';': 0x3B,
'<': 0x3C,
'=': 0x3D,
'>': 0x3E,
'?': 0x3F,
}
View Source
var KnownTags = []Tag{ TagAPDU, TagAPDULock, TagAPDUUnlock, TagClose, TagDownloadProfile, TagProcessNotification, TagManagement, TagMessageBox, TagReboot, }
Functions ¶
Types ¶
type Conn ¶
type Conn struct { Id string Conn *net.TCPConn APDU driver.APDU // contains filtered or unexported fields }
func (*Conn) RegisterHandler ¶ added in v1.0.1
type Manager ¶
type Manager interface { Add(id string, conn *Conn) Remove(id string) Get(id string) (*Conn, error) GetAll() []*Conn Len() int }
func NewManager ¶
func NewManager() Manager
Click to show internal directories.
Click to hide internal directories.