mirror of
https://github.com/nonoo/kappanhang.git
synced 2025-12-06 08:02:00 +01:00
Use own TX seqbuf entry struct
This commit is contained in:
parent
0eab91d9bf
commit
44f5b15994
10
txseqbuf.go
10
txseqbuf.go
|
|
@ -7,12 +7,18 @@ import "time"
|
||||||
// won't work (small radio memory?)
|
// won't work (small radio memory?)
|
||||||
const txSeqBufLength = 300 * time.Millisecond
|
const txSeqBufLength = 300 * time.Millisecond
|
||||||
|
|
||||||
|
type txSeqBufEntry struct {
|
||||||
|
seq seqNum
|
||||||
|
data []byte
|
||||||
|
addedAt time.Time
|
||||||
|
}
|
||||||
|
|
||||||
type txSeqBufStruct struct {
|
type txSeqBufStruct struct {
|
||||||
entries []seqBufEntry
|
entries []txSeqBufEntry
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *txSeqBufStruct) add(seq seqNum, p []byte) {
|
func (s *txSeqBufStruct) add(seq seqNum, p []byte) {
|
||||||
s.entries = append(s.entries, seqBufEntry{
|
s.entries = append(s.entries, txSeqBufEntry{
|
||||||
seq: seq,
|
seq: seq,
|
||||||
data: p,
|
data: p,
|
||||||
addedAt: time.Now(),
|
addedAt: time.Now(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue