Astro~/0.3
** Conformance / COP-1 * PAGE 12 / 23
** Astro * Conformance
** /conformance/cop

COP-1

PICS proforma: what this package implements, clause by clause.

Conformance Statement for pkg/cop, CCSDS 232.1-B-2


A2.1 GENERAL INFORMATION

A2.1.1 Identification of PICS

FieldValue
Date of Statement (DD/MM/YYYY)25/08/2026
PICS Serial NumberASTRO-COP-PICS-002
System Conformance Statement Cross-ReferenceThis document

A2.1.2 Identification of Implementation Under Test (IUT)

FieldValue
Implementation Nameastro/pkg/cop
Implementation VersionSee go.mod / latest commit on main
Special ConfigurationNone
Other InformationGo library implementing CCSDS COP-1 reliable frame delivery. Three components: FOP-1 (ground-side state machine S1-S6 with directives, T1 timer, transmission limit, suspend/resume, BC/BD paths), FARM-1 (spacecraft-side frame acceptance with positive/negative windows, buffer-driven Wait state, BC control command decoding), and CLCW (status reporting via TM return link). Thread-safe implementations with mutex protection. The T1 timer is caller-driven (no wall clock): configure with SetT1Initial and advance with Tick.

A2.1.3 Identification of Supplier

FieldValue
SupplierRavi Suhag
Contact Point for QueriesGitHub, github.com/ravisuhag/astro
Implementation Name(s) and Version(s)astro/pkg/cop (Go package)
System Name(s)Astro

A2.1.4 Identification of Specification

FieldValue
SpecificationCCSDS 232.1-B-2 (Communications Operation Procedure-1, Blue Book, Issue 2, October 2019)
Have any exceptions been required?Yes [X] No [ ]

NOTE, The FOP-1 event/action behavior follows the state tables of the standard as closely as practical for a library API; simplifications are declared per item below and in the exceptions list.


A2.2 REQUIREMENTS LIST

Table A-1: FOP-1 State Machine (section 5.1)

ItemDescriptionReferenceStatusSupportNotes
COP-1S1, Active5.1, table 5-1MYesFOPActive. Frames accepted, assigned V(S), transmitted within the sliding window.
COP-2S2, Retransmit without Wait5.1MYesFOPRetransmitWithoutWait. Entered on a retransmit-requesting CLCW or T1 expiry; unacknowledged frames re-queued for transmission.
COP-3S3, Retransmit with Wait5.1MYesFOPRetransmitWithWait. Entered on CLCW with Retransmit=1 and Wait=1; retransmissions held until the Wait flag clears.
COP-4S4, Initialising without BC Frame5.1MYesFOPInitialisingWithoutBC. Entered by Initiate AD with CLCW check; completes on a clean CLCW, adopting its Report Value as V(S)/NN(R).
COP-5S5, Initialising with BC Frame5.1MYesFOPInitialisingWithBC. Entered by Initiate AD with Unlock or Set V(R); the BC frame is served by GetNextFrame() and retransmitted on T1 expiry until a confirming CLCW arrives.
COP-6S6, Initial5.1MYesFOPInitial. Start state, and target of every Alert. CLCWs are ignored in S6.
COP-7Suspend States SS 0-45.1.9MYesSuspendState() returns SS (0 = not suspended, 1-4 = suspended from S1-S4). Entered on T1 expiry with the transmission limit reached and timeout type TT1.
COP-8Alert with Reason Codes5.1.10MYesEvery Alert purges all queues, stops T1, and moves to S6. LastAlert() reports the reason: AlertLimit, AlertLockout, AlertSynch, AlertNNR, AlertCLCW, AlertT1, AlertTerminate.

Table A-2: FOP-1 Directives (section 5.2)

ItemDescriptionReferenceStatusSupportNotes
COP-9Initiate AD Service (without CLCW check)5.2 (E23)MYesInitiateADWithoutCLCW(); Initialize(vs) combines it with Set V(S).
COP-10Initiate AD Service with CLCW check5.2 (E24)MYesInitiateADWithCLCWCheck(), waits in S4 for a clean CLCW (Lockout=0, Wait=0, Retransmit=0) under T1.
COP-11Initiate AD Service with Unlock5.2 (E25)MYesInitiateADWithUnlock(bcFrame), transmits the encoded BC Unlock frame (built with tcdl.NewUnlockFrame), retransmits on T1 expiry, completes when the CLCW Lockout flag clears.
COP-12Initiate AD Service with Set V(R)5.2 (E27)MYesInitiateADWithSetVR(vr, bcFrame), completes when a CLCW with Lockout=0 and Report Value == vr arrives; V(S) and NN(R) are then set to vr.
COP-13Terminate AD Service5.2 (E29)MYesTerminateAD(), purges all queues, stops T1, records AlertTerminate, moves to S6.
COP-14Resume AD Service5.2 (E30-E33)MYesResumeAD(), restores S1-S4 from SS 1-4 and restarts T1. Returns ErrFOPNotSuspended when SS = 0.
COP-15Set V(S)5.2 (E35)MYesSetVS(vs), only in S6 with SS = 0; sets V(S) and NN(R).
COP-16Set FOP Sliding Window5.2 (E36)MYesSetSlidingWindow(w), validates 1..255, rejects 0 with ErrFOPInvalidWindow. NewFOP clamps a zero width to 1.
COP-17Set T1 Initial5.2 (E37)MYesSetT1Initial(ticks), caller-defined tick units; 0 disables the timer.
COP-18Set Transmission Limit5.2 (E38)MYesSetTransmissionLimit(n), validates 1..255. Default 255.
COP-19Set Timeout Type5.2 (E39)MYesSetTimeoutType(tt), TT0 (Alert on expiry at limit) or TT1 (suspend). Default TT0.

Table A-3: FOP-1 Timer and Transmission Limit

ItemDescriptionReferenceStatusSupportNotes
COP-20T1 Timer5.2 (E16-E18)MYesCaller-driven clock: Tick(n) advances it; TimerRunning() reports state. Started on frame queueing and initiate directives, restarted when new frames are acknowledged, stopped when everything is acknowledged. NOTE: the library holds no wall clock by design; the mission supplies the tick source.
COP-21Transmission Limit / Transmission Count5.2MYestxCount starts at 1, increments on every retransmission initiation, resets when new frames are acknowledged. When T1 expires (or a retransmit is requested) with the count at the limit and no progress: Alert(LIMIT) under TT0, suspend under TT1.
COP-22Timer expiry actions5.2 (E16-E18)MYesBelow the limit: re-queue unacknowledged AD frames (or re-serve the BC frame in S5), increment the count, restart T1. At the limit: TT0 -> AlertLimit (S1-S3) / AlertT1 (S4-S5); TT1 -> suspend with SS 1-4.

Table A-4: FOP-1 CLCW Processing (E1-E14)

ItemDescriptionReferenceStatusSupportNotes
COP-23Lockout detectionE14MYesCLCW Lockout=1 in S1-S4 -> Alert(LOCKOUT), purge, S6. In S5 the flag is expected (the Unlock has not landed yet) and is ignored.
COP-24N(R) validity checkE13MYesN(R) must lie in NN(R)..V(S) (mod 256). Violations -> Alert(NNR) and ErrFOPInvalidNR.
COP-25AcknowledgmentE1/E5MYesFrames with N(S) < N(R) removed from the sent and wait queues; NN(R) updated; transmission count reset and T1 restarted while frames remain outstanding, stopped when all are acknowledged.
COP-26Retransmit flag handlingE8-E12MYesRetransmit=1 with Wait=0: unacknowledged frames re-queued (no duplicates), count incremented, S2. Retransmit=1 with Wait=1: retransmissions withheld, S3, released when Wait clears. Retransmit=1 with nothing outstanding: Alert(SYNCH).
COP-27Wait flag handlingE2/E6/E10MYesWait=1 without Retransmit, or Wait=1 with nothing outstanding, is an invalid CLCW -> Alert(CLCW). Wait=1 with Retransmit=1 -> hold retransmissions (S3).

Table A-5: FOP-1 Transmit Paths

ItemDescriptionReferenceStatusSupportNotes
COP-28AD frame transmission5.1MYesTransmitFrame() in S1-S3, assigns V(S), enforces the sliding window (ErrFOPWindowFull), starts T1. ErrFOPNotActive elsewhere.
COP-29BC frame transmission5.1MYesBC frames carried by the Initiate-with-Unlock / Set V(R) directives; served first by GetNextFrame() (N(S)=0) and retransmitted under T1.
COP-30BD frame transmission5.1MYesTransmitBDFrame(), expedited frames bypass sequence control, served ahead of AD frames, allowed in any state.

Table A-6: FARM-1 (section 6)

ItemDescriptionReferenceStatusSupportNotes
COP-31S1, Open6.1MYesFARMOpen.
COP-32S2, Wait6.1 (E2/E10)MYesFARMWait. Entered when an in-sequence frame arrives with no buffer free (frame discarded, Wait and Retransmit flags set); left when ReleaseBuffer() frees one. Buffer accounting configured with SetBuffers(n); disabled by default.
COP-33S3, Lockout6.1 (E5)MYesFARMLockout. Entered when N(S) falls outside both windows. The Retransmit flag is left untouched on entry. Cleared only by a BC Unlock.
COP-34Positive/negative window6.1.5 (E1-E5)MYesW is even (clamped/rounded by NewFARM); PW = NW = W/2. N(S)=V(R): accept (E1) or Wait-discard (E2). V(R) < N(S) <= V(R)+PW-1: discard, set Retransmit (E3). V(R)-NW <= N(S) < V(R): duplicate, discarded silently, no flags, no lockout (E4). Otherwise: Lockout (E5).
COP-35Type-BC identification232.0-B-4 4.1.2.3MYesBC = Bypass=1 AND Control Command=1. Bypass=0 with CC=1 is rejected as an invalid frame type. Type-BD (Bypass=1, CC=0) is always accepted.
COP-36Unlock control command4.1.3.3 / E7MYesData field 0x00: clears Lockout, Wait, and Retransmit; V(R) is NOT modified.
COP-37Set V(R) control command4.1.3.3 / E8MYesData field 0x82 0x00 <V(R)>: sets V(R) from the directive payload (not from the frame sequence number) and clears Retransmit. In Lockout it only increments the FARM-B counter. Malformed contents are discarded (E9, ErrInvalidControlCommand).
COP-38FARM-B counter6.1.7MYesIncremented (mod 4) for EVERY accepted Type-B frame, BD data frames and BC control commands alike.
COP-39CLCW generation6.2MYesGenerateCLCW() reports Lockout/Wait/Retransmit flags, FARM-B counter, and V(R).

Table A-7: CLCW Format (section 4.2)

ItemDescriptionReferenceStatusSupportNotes
COP-40CLCW field layout4.2MYesCLCW struct, 4 bytes, all 12 fields (Control Word Type, Version, Status, COP in Effect, VCID, No RF Available, No Bit Lock, Lockout, Wait, Retransmit, FARM-B, Report Value) with bit-exact Encode()/Decode() and validation.

A2.3 CONFORMANCE SUMMARY

Overall Statistics

CategoryTotal ItemsSupportedNot Supported
Mandatory (M)40400
Total40400

Declared Simplifications

The event/action tables of CCSDS 232.1-B-2 are followed as closely as practical for a library API. Known deviations:

AreaDeviation
T1 timerCaller-driven (Tick), not wall-clock; a T1 initial of 0 disables it. The standard assumes a real timer; the mission must supply the tick source.
S5 confirmationThe BC frame is confirmed by observing the CLCW (Lockout cleared, or Report Value matching the pinned V(R)) rather than by tracking the FARM-B counter delta.
Wait_QueueHigher-layer flow control is a bounded queue (TransmitFrame + window check) rather than the standard's one-FDU Wait_Queue with Accept/Reject signals.
S4 dirty CLCWsIn S4, CLCWs with Wait or Retransmit set are ignored (initialisation keeps waiting under T1) rather than raising an immediate alert.

Key Implementations

AreaItemsImplementation
FOP-1 statesCOP-1-8S1-S6, SS 0-4, alerts with reason codes, purge-on-alert.
FOP-1 directivesCOP-9-19All 11 directives with parameter validation.
Timer/limitCOP-20-22Caller-driven T1, transmission limit/count, TT0/TT1.
CLCW processingCOP-23-27Lockout, N(R) validity, ack, retransmit/wait flag handling.
Transmit pathsCOP-28-30AD sliding window, BC via initiate directives, BD expedited.
FARM-1COP-31-39Positive/negative windows, buffer-driven Wait, spec-compliant BC decoding, FARM-B on all Type-B frames.
CLCWCOP-40Bit-exact codec.