felica

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2015 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OUTPUT_NORMAL = iota
	OUTPUT_JSON
)

出力フォーマット

Variables

View Source
var Modules = make(map[string]Module)

登録モジュール

Functions

func DataPtr

func DataPtr(data *[]byte) unsafe.Pointer

C言語で使うためにデータにアクセスするポインタを取得する

func DispName

func DispName(tables map[interface{}]interface{}, name string, value int, base int, opt_values ...int) interface{}

テーブルを検索して表示用の文字列を返す

func DispString added in v0.2.0

func DispString(str string, width int) string

指定された表示文字になるように調整する

func LoadYAML

func LoadYAML(fname string) (map[interface{}]interface{}, error)

YAML を読込む

func Register added in v0.1.2

func Register(name string, module Module)

モジュールの登録

Types

type ByUint16 added in v0.1.1

type ByUint16 []uint16

func (ByUint16) Len added in v0.1.1

func (a ByUint16) Len() int

func (ByUint16) Less added in v0.1.1

func (a ByUint16) Less(i, j int) bool

func (ByUint16) Swap added in v0.1.1

func (a ByUint16) Swap(i, j int)

type CardInfo

type CardInfo map[uint16]*SystemInfo

カード情報

func Read

func Read(path string) CardInfo

FeliCaダンプファイルを読込む

type Engine

type Engine interface {
	Name() string              // カード名
	ShowInfo(options *Options) // カード情報を表示する
}

type Module

type Module interface {
	IsCard(cardinfo CardInfo) bool // 対応カードか?
	Bind(cardinfo CardInfo) Engine // CardInfo を束縛した Engine を作成する
}

func Find added in v0.1.2

func Find(cardinfo CardInfo) Module

カードに対応するモジュールを探す

type Options

type Options struct {
	Extend bool // 拡張表示
	Hex    bool // データの16進表示もいっしょに表示する
	Format int  // 出力フォーマット
}

オプションフラグ

type ServiceInfo

type ServiceInfo map[uint16]([][]byte)

サービス情報

type SystemInfo

type SystemInfo struct {
	IDm      string
	PMm      string
	Services ServiceInfo
}

システム情報

func (*SystemInfo) ServiceCodes

func (sysinfo *SystemInfo) ServiceCodes() []uint16

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL