Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
Removed use of security header/trailer for BC TC frames
Browse files Browse the repository at this point in the history
  • Loading branch information
dariol83 committed Feb 11, 2024
1 parent 36b10b2 commit 909d353
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,13 @@ public void setAdMode(boolean adMode) {
* This method generates and dispatches an Unlock BC-frame, to remove the Lockout state from the on-board FARM.
*/
public void dispatchUnlock() {
byte[] secH = secHeaderSupplier != null ? secHeaderSupplier.get() : new byte[0];
byte[] secT = secTrailerSupplier != null ? secTrailerSupplier.get() : new byte[0];

// As per CCSDS 232.0-B-4, 6.3.1: no security header/trailer for BC frames
TcTransferFrame tc = TcTransferFrameBuilder.create(isFecfPresent())
.setSpacecraftId(getSpacecraftId())
.setVirtualChannelId(getVirtualChannelId())
.setFrameSequenceNumber(0) // As per 4.1.2.8 of CCSDS 232.0-B-3, point 3
.setBypassFlag(true)
.setControlCommandFlag(true)
.setSecurity(secH, secT)
.setUnlockControlCommand()
.build();

Expand All @@ -176,16 +173,13 @@ public void dispatchUnlock() {
* @param frameNumber the frame number for the Set_V(R)
*/
public void dispatchSetVr(int frameNumber) {
byte[] secH = secHeaderSupplier != null ? secHeaderSupplier.get() : new byte[0];
byte[] secT = secTrailerSupplier != null ? secTrailerSupplier.get() : new byte[0];

// As per CCSDS 232.0-B-4, 6.3.1: no security header/trailer for BC frames
TcTransferFrame tc = TcTransferFrameBuilder.create(isFecfPresent())
.setSpacecraftId(getSpacecraftId())
.setVirtualChannelId(getVirtualChannelId())
.setFrameSequenceNumber(0) // As per 4.1.2.8 of CCSDS 232.0-B-3, point 3
.setBypassFlag(true)
.setControlCommandFlag(true)
.setSecurity(secH, secT)
.setSetVrControlCommand(frameNumber)
.build();
notifyTransferFrameGenerated(tc, 0);
Expand Down

0 comments on commit 909d353

Please sign in to comment.