We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 639e44b commit 9ad39b7Copy full SHA for 9ad39b7
internal/backend/basicstation/backend_test.go
@@ -180,6 +180,7 @@ func (ts *BackendTestSuite) TestUplinkDataFrame() {
180
Rssi: 120,
181
LoraSnr: 5.5,
182
Context: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02},
183
+ CrcStatus: gw.CRCStatus_CRC_OK,
184
},
185
}, uplinkFrame)
186
}
@@ -232,6 +233,7 @@ func (ts *BackendTestSuite) TestJoinRequest() {
232
233
234
235
236
237
238
239
@@ -279,6 +281,7 @@ func (ts *BackendTestSuite) TestProprietaryDataFrame() {
279
281
280
282
283
284
285
286
287
internal/backend/basicstation/structs/join_request_test.go
@@ -66,6 +66,7 @@ func TestJoinRequestToProto(t *testing.T) {
66
67
68
69
70
71
}, pb)
72
internal/backend/basicstation/structs/radio_meta_data.go
@@ -70,6 +70,7 @@ func SetRadioMetaDataToProto(loraBand band.Band, gatewayID lorawan.EUI64, rmd Ra
GatewayId: gatewayID[:],
Rssi: int32(rmd.UpInfo.RSSI),
LoraSnr: float64(rmd.UpInfo.SNR),
73
74
75
76
if gpsTime := rmd.UpInfo.GPSTime; gpsTime != 0 {
internal/backend/basicstation/structs/radio_meta_data_test.go
@@ -55,6 +55,7 @@ func TestSetRadioMetaDataToProto(t *testing.T) {
55
56
57
58
59
60
61
@@ -83,6 +84,7 @@ func TestSetRadioMetaDataToProto(t *testing.T) {
83
84
GatewayId: []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08},
85
86
87
88
89
90
@@ -118,6 +120,7 @@ func TestSetRadioMetaDataToProto(t *testing.T) {
118
120
119
121
TimeSinceGpsEpoch: ptypes.DurationProto(5 * time.Second),
122
Time: timeP,
123
124
125
126
internal/backend/basicstation/structs/uplink_data_frame_test.go
@@ -59,6 +59,7 @@ func TestUplinkDataFrameToProto(t *testing.T) {
62
63
64
65
@@ -102,6 +103,7 @@ func TestUplinkDataFrameToProto(t *testing.T) {
102
103
104
105
106
107
108
109
@@ -146,6 +148,7 @@ func TestUplinkDataFrameToProto(t *testing.T) {
146
148
147
149
150
151
152
153
154
internal/backend/basicstation/structs/uplink_proprietary_test.go
@@ -51,6 +51,7 @@ func TestUplinkProprietaryFrameToProto(t *testing.T) {
51
52
53
54
internal/backend/semtechudp/backend_test.go
@@ -319,11 +319,12 @@ func (ts *BackendTestSuite) TestPushData() {
319
TimeSinceGpsEpoch: &duration.Duration{
320
Seconds: 1,
321
322
- Rssi: -51,
323
- LoraSnr: 7,
324
- Channel: 2,
325
- RfChain: 1,
326
- Context: []byte{0x2a, 0x33, 0x7a, 0xb3},
+ Rssi: -51,
+ LoraSnr: 7,
+ Channel: 2,
+ RfChain: 1,
+ Context: []byte{0x2a, 0x33, 0x7a, 0xb3},
327
328
329
330
internal/backend/semtechudp/packets/push_data.go
@@ -169,6 +169,15 @@ func getUplinkFrame(gatewayID []byte, rxpk RXPK, FakeRxInfoTime bool) (gw.Uplink
169
170
171
172
+ switch rxpk.Stat {
173
+ case 1:
174
+ frame.RxInfo.CrcStatus = gw.CRCStatus_CRC_OK
175
+ case -1:
176
+ frame.RxInfo.CrcStatus = gw.CRCStatus_BAD_CRC
177
+ default:
178
+ frame.RxInfo.CrcStatus = gw.CRCStatus_NO_CRC
179
+ }
+
// Context
binary.BigEndian.PutUint32(frame.RxInfo.Context, rxpk.Tmst)
internal/backend/semtechudp/packets/push_data_test.go
@@ -245,6 +245,7 @@ func TestGetUplinkFrame(t *testing.T) {
245
Board: 2,
246
Antenna: 0,
247
Context: []byte{0x00, 0x0f, 0x42, 0x40},
248
+ CrcStatus: gw.CRCStatus_BAD_CRC,
249
250
251
@@ -302,6 +303,7 @@ func TestGetUplinkFrame(t *testing.T) {
302
303
304
305
306
307
308
309
@@ -381,7 +383,8 @@ func TestGetUplinkFrame(t *testing.T) {
381
383
EncryptedNs: []byte{2, 3, 4, 5},
382
384
385
- Context: []byte{0x00, 0x0f, 0x42, 0x40},
386
+ Context: []byte{0x00, 0x0f, 0x42, 0x40},
387
388
389
390
{
@@ -409,6 +412,7 @@ func TestGetUplinkFrame(t *testing.T) {
409
412
410
413
Antenna: 9,
411
414
415
416
417
418
0 commit comments