(1) In a trial by court-martial or in a trial by military judge only pursuant to section 28-3.1-316 (4) in which a punitive discharge may be adjudged, the state may not appeal a finding of not guilty with respect to the charge or specification. In a trial by court-martial in which a punitive discharge may be adjudged, the state may appeal the following:
(a) An order or ruling of the military judge that terminates the proceedings with respect to a charge or specification;
(b) An order or ruling that excludes evidence that is substantial proof of a fact material in the proceeding;
(c) An order or ruling that directs the disclosure of classified information;
(d) An order or ruling that imposes sanctions for nondisclosure of classified information;
(e) A refusal of the military judge to issue a protective order sought by the state to prevent the disclosure of classified information; or
(f) A refusal by the military judge to enforce an order described in subsection (1)(e) of this section that has previously been issued by the appropriate authority.
(2) An appeal of an order or ruling may not be taken unless the trial counsel provides the military judge with written notice of appeal from the order or ruling within seventy-two hours of the order or ruling. Such notice must include a certification by the trial counsel that the appeal is not taken for the purpose of delay and, if the order or ruling appealed is one that excludes evidence, that the evidence excluded is substantial proof of a fact material in the proceeding.
(3) An appeal under this article 3.1 must be diligently prosecuted as provided by law.
(4) An appeal under this article 3.1 must be forwarded to the court prescribed in this code. In ruling on an appeal under this article 3.1, that court may act only with respect to matters of law.
(5) Any period of delay resulting from an appeal under this article 3.1 must be excluded in deciding any issue regarding denial of a speedy trial unless an appropriate authority determines that the appeal was filed solely for the purpose of delay with the knowledge that it was totally frivolous and without merit.