rts-sim-testing-service/third_party/axle_device/beijing12/service_test.go

20 lines
843 B
Go
Raw Normal View History

package beijing12
import (
"fmt"
"joylink.club/bj-rtsts-server/third_party/axle_device/beijing12/msg"
"testing"
)
func Test_serviceContext_calculateSvc1(t *testing.T) {
serviceCtx := &serviceContext{
localSid1: 0x7665986c,
localSid2: 0x67da286e,
lfsr1: &lfsr{value: uint32(0x7665986c), poly: msg.T_POLY_1},
lfsr2: &lfsr{value: uint32(0x67da286e), poly: msg.T_POLY_2},
}
userData := []byte{00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00}
fmt.Printf("%x\n", serviceCtx.calculateSvc1(userData))
fmt.Printf("%x\n", serviceCtx.calculateSvc2(userData))
}