Documentation ¶
Index ¶
Constants ¶
View Source
const (
APDUCommunicateTimeout = "6600"
)
Variables ¶
View Source
var ( ErrInvalidActivationCode = errors.New("invalid activation code") ErrInvalidDataSize = errors.New("invalid data size") ErrCommandUnsupported = errors.New("command unsupported") ErrCommandSeqNumberRequired = errors.New("seq number is required") ErrNoNotificationFound = errors.New("no notification found") // GSM 7-bit encoding, see https://en.wikipedia.org/wiki/GSM_03.38 GSMNumberSign = []byte{0x23} // # GSMDollarSign = []byte{0x02} // $ GSMSlashSign = []byte{0x2F} // / CommandConsumeData = []byte("/data") CommandProcessNotification = []byte("/process") CommandListNotifications = []byte("/ln") CommandArgumentSplitter = []byte(" ") CommandListNotificationsLimit = 4 ActivationCodeSchemaLPA = []byte("LPA:") ActivationCodeSchemaQRCyou = []byte("qr.esim.cyou/") )
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 ¶
func ToGSM7Bytes ¶ added in v1.0.11
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.