-
Notifications
You must be signed in to change notification settings - Fork 2
/
gate.go
53 lines (42 loc) · 1.04 KB
/
gate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package s9
import (
"bytes"
"os"
"github.com/baranovskis/bmd-converter/bmd"
)
type Gate struct {
bmd.BaseBmdAdapter // inherits methods
}
func (g *Gate) GetStruct() interface{} {
type bmdStruct struct {
Flag uint8 `csv:"flag"`
MapNumber uint8 `csv:"map_number"`
StartX uint8 `csv:"start_x"`
StartY uint8 `csv:"start_y"`
EndX uint8 `csv:"end_x"`
EndY uint8 `csv:"end_y"`
Target uint16 `csv:"target"`
Direction uint16 `csv:"direction"`
MinLevel uint16 `csv:"min_level"`
MaxLevel uint16 `csv:"max_level"`
}
return &bmdStruct{}
}
func (g *Gate) GetVersion(data *[]byte) (res int16, err error) {
return -1, nil
}
func (g *Gate) GetRowsCount(data *[]byte) (res int32, err error) {
return -1, nil
}
func (g *Gate) GetCrcValue(data *[]byte) (res int32, err error) {
return -1, nil
}
func (g *Gate) SetVersion(file *os.File) error {
return nil
}
func (g *Gate) SetRowsCount(file *os.File, count int) error {
return nil
}
func (g *Gate) SetCrcValue(file *os.File, buff bytes.Buffer) error {
return nil
}