Skip to content

Commit

Permalink
Attempt to not schedule a downlink for a Halter mode non-class A uplink
Browse files Browse the repository at this point in the history
  • Loading branch information
thealastair committed Nov 7, 2024
1 parent 6f4ee7b commit 6871490
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/networkserver/grpc_gsns.go
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,13 @@ func (ns *NetworkServer) handleDataUplink(ctx context.Context, up *ttnpb.UplinkM
paths := ttnpb.AddFields(matched.SetPaths,
"mac_state.recent_uplinks",
)
stored.MacState.RecentUplinks = appendRecentUplink(stored.MacState.RecentUplinks, up, recentUplinkCount)

// HALTER - if this is data mode uplink (not class A, no corresponding Rx1/Rx2 window), don't schedule a downlink, do this by not adding the uplink to the recent uplinks list

Check failure on line 1039 in pkg/networkserver/grpc_gsns.go

View workflow job for this annotation

GitHub Actions / Code Quality

line is 180 characters (lll)
const nonClassADataUplinkPort = 222
if up.Payload.GetMacPayload().FPort != nonClassADataUplinkPort {
stored.MacState.RecentUplinks = appendRecentUplink(stored.MacState.RecentUplinks, up, recentUplinkCount)
}
// HALTER - end

if matched.DataRateIndex < stored.MacState.CurrentParameters.AdrDataRateIndex {
// Device lowers TX power index before lowering data rate index according to the spec.
Expand Down Expand Up @@ -1411,6 +1417,8 @@ func (ns *NetworkServer) HandleUplink(ctx context.Context, up *ttnpb.UplinkMessa
return nil, err
}

// AB here is where uplink is processed, probably?

ctx = events.ContextWithCorrelationID(ctx, up.CorrelationIds...)
ctx = appendUplinkCorrelationID(ctx)
up.CorrelationIds = events.CorrelationIDsFromContext(ctx)
Expand Down

0 comments on commit 6871490

Please sign in to comment.