Skip to content

Commit

Permalink
Set McGroupBitMask in stepFragmentationSessionSetup. (#16)
Browse files Browse the repository at this point in the history
Co-authored-by: Karol Witusik <[email protected]>
  • Loading branch information
ferre111 and Karol Witusik authored Apr 2, 2024
1 parent 28a40c2 commit 6e01468
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/fuota/fuota.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,8 @@ devLoop:
CID: fragmentation.FragSessionSetupReq,
Payload: &fragmentation.FragSessionSetupReqPayload{
FragSession: fragmentation.FragSessionSetupReqPayloadFragSession{
FragIndex: d.opts.FragmentationSessionIndex,
FragIndex: d.opts.FragmentationSessionIndex,
McGroupBitMask: [4]bool{d.opts.MulticastGroupID == 0, d.opts.MulticastGroupID == 1, d.opts.MulticastGroupID == 2, d.opts.MulticastGroupID == 3},
},
NbFrag: uint16(nbFrag),
FragSize: uint8(d.opts.FragSize),
Expand Down Expand Up @@ -1002,6 +1003,7 @@ devLoop:
Fields: hstore.Hstore{
Map: map[string]sql.NullString{
"frag_index": sql.NullString{Valid: true, String: fmt.Sprintf("%d", d.opts.FragmentationSessionIndex)},
"McGroupBitMask": sql.NullString{Valid: true, String: fmt.Sprintf("%d", uint32(1<<d.opts.MulticastGroupID))},
"nb_frag": sql.NullString{Valid: true, String: fmt.Sprintf("%d", nbFrag)},
"frag_size": sql.NullString{Valid: true, String: fmt.Sprintf("%d", d.opts.FragSize)},
"fragmentation_matrix": sql.NullString{Valid: true, String: fmt.Sprintf("%d", d.opts.FragmentationMatrix)},
Expand Down

0 comments on commit 6e01468

Please sign in to comment.