CdmHeader.java

  1. /* Copyright 2002-2025 CS GROUP
  2.  * Licensed to CS GROUP (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.files.ccsds.ndm.cdm;

  18. import org.orekit.files.ccsds.section.Header;

  19. /**
  20.  * Header of a CCSDS Conjunction Data Message.
  21.  * @author Melina Vanel
  22.  * @since 11.2
  23.  */
  24. public class CdmHeader extends Header {

  25.     /** ID that uniquely identifies a message from a given originator. */
  26.     private String messageFor;

  27.     /**
  28.      * Constructor.
  29.      */
  30.     public CdmHeader() {
  31.         super(1.0, 2.0);
  32.     }

  33.     /** {@inheritDoc} */
  34.     @Override
  35.     public void validate(final double version) {
  36.         super.validate(version);
  37.     }

  38.     /**
  39.      * Get the spacecraft name for which the CDM is provided stored in MESSAGE_FOR key.
  40.      * @return messageFor the spacecraft name for which the CDM is provided.
  41.      */
  42.     public String getMessageFor() {
  43.         return messageFor;
  44.     }

  45.     /**
  46.      * Set the spacecraft name for which the CDM is provided stored in MESSAGE_FOR key.
  47.      * @param spacecraftNames the spacecraft name for which the CDM is provided.
  48.      */
  49.     public void setMessageFor(final String spacecraftNames) {
  50.         refuseFurtherComments();
  51.         this.messageFor = spacecraftNames;
  52.     }

  53. }