-
Notifications
You must be signed in to change notification settings - Fork 174
/
bufferflow_default.go
85 lines (64 loc) · 1.7 KB
/
bufferflow_default.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package main
import (
"log"
//"regexp"
//"strconv"
//"time"
)
type BufferflowDefault struct {
Name string
Port string
}
var ()
func (b *BufferflowDefault) Init() {
log.Println("Initting default buffer flow (which means no buffering)")
}
func (b *BufferflowDefault) RewriteSerialData(cmd string, id string) string {
return ""
}
func (b *BufferflowDefault) BlockUntilReady(cmd string, id string) (bool, bool, string) {
//log.Printf("BlockUntilReady() start\n")
return true, false, ""
}
func (b *BufferflowDefault) OnIncomingData(data string) {
//log.Printf("OnIncomingData() start. data:%v\n", data)
}
// Clean out b.sem so it can truly block
func (b *BufferflowDefault) ClearOutSemaphore() {
}
func (b *BufferflowDefault) BreakApartCommands(cmd string) []string {
return []string{cmd}
}
func (b *BufferflowDefault) Pause() {
return
}
func (b *BufferflowDefault) Unpause() {
return
}
func (b *BufferflowDefault) SeeIfSpecificCommandsShouldSkipBuffer(cmd string) bool {
return false
}
func (b *BufferflowDefault) SeeIfSpecificCommandsShouldPauseBuffer(cmd string) bool {
return false
}
func (b *BufferflowDefault) SeeIfSpecificCommandsShouldUnpauseBuffer(cmd string) bool {
return false
}
func (b *BufferflowDefault) SeeIfSpecificCommandsShouldWipeBuffer(cmd string) bool {
return false
}
func (b *BufferflowDefault) SeeIfSpecificCommandsReturnNoResponse(cmd string) bool {
return false
}
func (b *BufferflowDefault) ReleaseLock() {
}
func (b *BufferflowDefault) IsBufferGloballySendingBackIncomingData() bool {
return false
}
func (b *BufferflowDefault) Close() {
}
func (b *BufferflowDefault) GetManualPaused() bool {
return false
}
func (b *BufferflowDefault) SetManualPaused(isPaused bool) {
}