• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SpiNNakerManchester / JavaSpiNNaker / 13520271443

25 Feb 2025 11:34AM UTC coverage: 38.48% (-0.03%) from 38.51%
13520271443

push

github

rowleya
Fix tabs

675 of 2950 new or added lines in 17 files covered. (22.88%)

9 existing lines in 2 files now uncovered.

9182 of 23862 relevant lines covered (38.48%)

1.15 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/SpiNNaker-comms/src/main/java/uk/ac/manchester/spinnaker/protocols/FastDataInCommandID.java
1
/*
2
 * Copyright (c) 2019 The University of Manchester
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     https://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package uk.ac.manchester.spinnaker.protocols;
17

18
import static uk.ac.manchester.spinnaker.utils.CollectionUtils.makeEnumBackingMap;
19

20
import java.util.Map;
21

22
/**
23
 * Command IDs for the SDP packets for data in.
24
 *
25
 * @author Donal Fellows
26
 */
27
public enum FastDataInCommandID {
×
28
        /** Host to Gatherer: start accepting data bound for location. */
NEW
29
        SEND_DATA_TO_LOCATION(200),
×
30
        /** Host to Gatherer: more data with sequence number. */
NEW
31
        SEND_SEQ_DATA(2000),
×
32
        /** Host to Gatherer: all data transmitted. */
NEW
33
        SEND_TELL_DATA_IN(2001),
×
34
        /** Gatherer to host: there are missing sequence numbers. */
NEW
35
        RECEIVE_MISSING_SEQ_DATA_IN(2002),
×
36
        /** Gatherer to host: all present and correct. */
NEW
37
        RECEIVE_FINISHED_DATA_IN(2003);
×
38

NEW
39
        private static final Map<Integer, FastDataInCommandID> MAP =
×
NEW
40
                        makeEnumBackingMap(values(), v -> v.value);
×
41

42
        /** The protocol ID of this constant. */
43
        public final int value;
44

NEW
45
        FastDataInCommandID(int value) {
×
NEW
46
                this.value = value;
×
NEW
47
        }
×
48

49
        /**
50
         * Get a constant by its protocol ID.
51
         *
52
         * @param value
53
         *            The protocol ID
54
         * @return The matching constant.
55
         * @throws IllegalArgumentException
56
         *             if the value isn't one of the ones accepted by this class.
57
         */
58
        public static FastDataInCommandID forValue(int value) {
NEW
59
                var id = MAP.get(value);
×
NEW
60
                if (id == null) {
×
NEW
61
                        throw new IllegalArgumentException(
×
62
                                        "unexpected command code: " + value);
63
                }
NEW
64
                return id;
×
65
        }
66
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc