object

# `ccsds_cds(DaySegmentOctets,SubmillisecondOctets,Epoch)`

- `DaySegmentOctets` - Number of day segment octets. Supported values are `2` and `3`.

- `SubmillisecondOctets` - Number of submillisecond octets. Supported values are `0`, `2`, and `4`.

- `Epoch` - Epoch used when converting to and from Unix seconds. Supported values are `ccsds_epoch` and `unix_epoch`.

CCSDS day segmented time code parser and generator.

Availability:
`logtalk_load(ccsds_time_codes(loader))`
Author: Paulo Moura
Version: 1:0:1
Date: 2026-06-24
Compilation flags:
`static, context_switching_calls`
Implements:
`public` ccsds_time_code_protocol
Uses:
reader
type
Remarks:
(none)
Inherited public predicates:
epoch/1 format/1 from_unix_seconds/2 generate/2 generate/3 parse/2 unix_seconds/2 valid/1

## Public predicates

### `days/2`

Extracts the day segment value from a CDS time term.

Compilation flags:
`static`
Template:
`days(TimeCode,Days)`
Mode and number of proofs:
`days(+compound,-integer)` - `one`

### `milliseconds/2`

Extracts the millisecond-of-day value from a CDS time term.

Compilation flags:
`static`
Template:
`milliseconds(TimeCode,Milliseconds)`
Mode and number of proofs:
`milliseconds(+compound,-integer)` - `one`

### `submilliseconds/2`

Extracts the optional submillisecond value from a CDS time term. Two-octet objects use microseconds; four-octet objects use picoseconds within the millisecond.

Compilation flags:
`static`
Template:
`submilliseconds(TimeCode,Submilliseconds)`
Mode and number of proofs:
`submilliseconds(+compound,-integer)` - `zero_or_one`

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)