-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
38 lines (26 loc) · 1.93 KB
/
errors.go
File metadata and controls
38 lines (26 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package tcf
import "errors"
var (
// ErrDataTooShort indicates the provided data is too short for decoding.
ErrDataTooShort = errors.New("provided data is too short to decode time code")
// ErrInvalidPField indicates the P-field does not conform to CCSDS 301.0-B-4.
ErrInvalidPField = errors.New("invalid P-field: does not conform to CCSDS 301.0-B-4")
// ErrInvalidTimeCodeID indicates an unrecognized time code identification.
ErrInvalidTimeCodeID = errors.New("invalid time code ID: must be a recognized CCSDS code type")
// ErrInvalidCoarseOctets indicates the coarse time octet count is out of range.
ErrInvalidCoarseOctets = errors.New("invalid coarse time: must be 1-4 basic octets (up to 7 with extension)")
// ErrInvalidFineOctets indicates the fine time octet count is out of range.
ErrInvalidFineOctets = errors.New("invalid fine time: must be 0-3 basic octets (up to 6 with extension)")
// ErrInvalidDaySegment indicates the day count is negative or out of range.
ErrInvalidDaySegment = errors.New("invalid day segment: day count out of range")
// ErrInvalidMilliseconds indicates the milliseconds-of-day value is out of range.
ErrInvalidMilliseconds = errors.New("invalid milliseconds: must be in range 0-86399999")
// ErrInvalidCalendarTime indicates a calendar field is out of range.
ErrInvalidCalendarTime = errors.New("invalid calendar time: field value out of range")
// ErrInvalidASCIIFormat indicates the ASCII time string does not match the expected format.
ErrInvalidASCIIFormat = errors.New("invalid ASCII time code: format does not match CCSDS Type A or Type B")
// ErrEpochRequired indicates a custom epoch is required for Level 2 codes but was not provided.
ErrEpochRequired = errors.New("agency-defined epoch required for Level 2 time code")
// ErrOverflow indicates the time value exceeds the representable range.
ErrOverflow = errors.New("time value exceeds representable range for the configured octet width")
)