19 KiB
19 KiB
Change Log
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
[unreleased]
Changed
- Renamed
PacketId
andPacketSequenceCtrl
new
method tonew_checked
and formernew_const
method tonew
. - Renamed
tc
,tm
,tc_unseg
andtm_unseg
variants forPacketId
andSpHeader
tonew_for_tc_checked
,new_for_tm_checked
,new_for_unseg_tc_checked
andnew_for_unseg_tm_checked
.
[v0.11.0-rc.1] 2024-04-03
Major API changes for the time API. If you are using the time API, it is strongly recommended to check all the API changes in the Changed chapter.
Fixed
- CUC timestamp was fixed to include leap second corrections because it is based on the TAI
time reference. The default CUC time object do not implement
CcsdsTimeProvider
anymore because the trait methods require cached leap second information. This task is now performed by thecuc::CucTimeWithLeapSecs
which implements the trait.
Added
From<$EcssEnum$TY> from $TY
for the ECSS enum type definitions.- Added basic support conversions to the
time
library. Introduce newchrono
andtimelib
feature gate. - Added
CcsdsTimeProvider::timelib_date_time
. - Optional support for
defmt
by adding optionaldefmt::Format
derives for common types.
Changed
PusTcCreator::new_simple
now expects a valid slice for the source data instead of an optional slice. For telecommands without application data,&[]
can be passed.PusTmSecondaryHeader
constructors now expects a valid slice for the time stamp instead of an optional slice.- Renamed
CcsdsTimeProvider::date_time
toCcsdsTimeProvider::chrono_date_time
- Renamed
CcsdsTimeCodes
toCcsdsTimeCode
- Renamed
cds::TimeProvider
tocds::CdsTime
- Renamed
cuc::TimeProviderCcsdsEpoch
tocuc::CucTime
UnixTimestamp
renamed toUnixTime
UnixTime
seconds are now private and can be retrieved using thesecs
member method.UnixTime::new
renamed toUnixTime::new_checked
.UnixTime::secs
renamed toUnixTime::as_secs
.UnixTime
now has a nanosecond subsecond precision. Thenew
constructor now expects nanoseconds as the second argument.- Added new
UnixTime::new_subsec_millis
andUnixTime::new_subsec_millis_checked
API to still allow creating a timestamp with only millisecond subsecond resolution. CcsdsTimeProvider
now has a newsubsec_nanos
method in addition to a default implementation for thesubsec_millis
method.CcsdsTimeProvider::date_time
renamed toCcsdsTimeProvider::chrono_date_time
.- Added
UnixTime::MIN
,UnixTime::MAX
andUnixTime::EPOCH
. - Added
UnixTime::timelib_date_time
. - Error handling for ECSS and time module is more granular now, with a new
DateBeforeCcsdsEpochError
error and aDateBeforeCcsdsEpoch
enum variant for bothCdsError
andCucError
. PusTmCreator
now has two lifetimes: One for the raw source data buffer and one for the raw timestamp.- Time API
from_now*
API renamed tonow*
.
Removed
- Legacy
PusTm
andPusTc
objects.
[v0.11.0-rc.0] 2024-03-04
Added
From<$TY>
for theEcssEnum$TY
ECSS enum type definitions.Sub
implementation forUnixTimestamp
to calculate the duration between two timestamps.
Changed
CcsdsTimeProvider
subsecond_millis
function now returnsu16
instead ofOption<u16>
.UnixTimestamp
subsecond_millis
function now returnsu16
instead ofOption<u16>
.
[v0.10.0] 2024-02-17
Added
- Added
value
andto_vec
methods for theUnsignedEnum
trait. The value is returned as asu64
. Renamed formervalue
method onGenericUnsignedByteField
tovalue_typed
. - Added
value_const
const function forUnsignedByteField
type. - Added
value_typed
const functions forGenericUnsignedByteField
andGenericEcssEnumWrapper
.
[v0.9.0] 2024-02-07
Added
CcsdsPacket
,PusPacket
andGenericPusTmSecondaryHeader
implementation forPusTmZeroCopyWriter
.- Additional length checks for
PusTmZeroCopyWriter
.
Changed
PusTmZeroCopyWriter
: Added additional timestamp length argument fornew
constructor.
Fixed
- Typo:
PUC_TM_MIN_HEADER_LEN
->PUS_TM_MIN_HEADER_LEN
[v0.8.1] 2024-02-05
Fixed
- Added
pub
visibility forPacketSequenceCtrl::const_new
.
[v0.8.0] 2024-02-05
Added
- Added
len_written
andto_vec
methods to theTimeWriter
trait.
[v0.7.0] 2024-02-01
[v0.7.0-beta.4] 2024-01-23
Fixed
MetadataPduCreator
: The serialization function shifted the closure requested information to the wrong position (first reserved bit) inside the raw content field.
[v0.7.0-beta.3] 2023-12-06
Added
- Add
WritablePduPacket
trait which is a common trait of all CFDP PDU implementations. - Add
CfdpPdu
trait which exposes fields and attributes common to all CFDP PDUs. - Add
GenericTlv
andWritableTlv
trait as abstractions for the various TLV types.
Fixed
- Set the direction field inside the PDU header field correctly explicitely for all CFDP PDU packets.
Changed
- Split up
FinishedPdu
intoFinishedPduCreator
andFinishedPduReader
to expose specialized APIs. - Split up
MetadataPdu
intoMetadataPduCreator
andMetadataPduReader
to expose specialized APIs. - Cleaned up CUC time implementation. Added
width
andcounter
getter methods. - Renamed
SerializablePusPacket
toWritablePusPacket
. - Renamed
UnsignedPfc
toPfcUnsigned
andRealPfc
toPfcReal
. - Renamed
WritablePduPacket.written_len
andSerializablePusPacket.len_packed
tolen_written
. - Introduce custom implementation of
PartialEq
forCommonPduConfig
which only compares the values for the source entity ID, destination entity ID and transaction sequence number field to allow those fields to have different widths. - Removed the
PusError::RawDataTooShort
variant which is already covered byPusError::ByteConversionError
variant. - Ranamed
TlvLvError::ByteConversionError
toTlvLvError::ByteConversion
. - Renamed
PusError::IncorrectCrc
toPusError::ChecksumFailure
. - Some more struct variant changes for error enumerations.
Removed
PusError::NoRawData
variant.cfdp::LenInBytes
which was not used.
[v0.7.0-beta.2] 2023-09-26
Added
PacketId
trait impls:Ord
,PartialOrd
andHash
SerializablePusPacket
trait: Addto_vec
method with default implementation.
[v0.7.0-beta.1] 2023-08-28
- Bump
zerocopy
dependency to v0.7.0
Changed
- The
Tlv
andLv
API return&[u8]
instead ofOption<&[u8]>
. ByteConversionError
error variantsToSliceTooSmall
andFromSliceTooSmall
are struct variants now.SizeMissmatch
was removed appropriately.UnsignedByteFieldError
error variantsValueTooLargeForWidth
andInvalidWidth
are struct variants now.TimestampError
error variantInvalidTimeCode
is struct variant now.
Added
- Added
raw_data
API forTlv
andLv
to retrieve the wholeLv
/Tlv
slice if the object was created from a raw bytestream. - Added
MsgToUserTlv
helper class which wraps a regularTlv
and adds some useful functionality. UnsignedByteField
andGenericUnsignedByteField
new
methods areconst
now.PduError
variants which contained a tuple variant with multiple fields were converted to a struct variant.
Added
- Added
pdu_datafield_len
getter function forPduHeader
Removed
SizeMissmatch
because it is not required for theByteConversionError
error enumeration anymore.
[v0.7.0-beta.0] 2023-08-16
- Moved MSRV from v1.60 to v1.61.
Changed
PusPacket
trait:user_data
now returns&[u8]
instead ofOption<&[u8]>
. Empty user data can simply be an empty slice.- Moved ECSS TC components from
tc
toecss.tc
. - Moved ECSS TM components from
tm
toecss.tm
. - Converted
PusTc
class to more specializedPusTcCreator
andPusTcReader
classes. The oldPusTc
class is deprecated now. - Converted
PusTm
class to more specializedPusTmCreator
andPusTmReader
classes. The oldPusTm
class is deprecated now. - Implement
Display
andError
forStdTimestampError
properly. - Remove some redundant
Error
suffixes for enum error variants. CommonPduConfig
:new_with_defaults
replaced bynew_with_byte_fields
.
Added
source_data
andapp_data
API provided for PUS TM and PUS TC reader classes. These simply calluser_data
but are also in line with the PUS packet standard names for those fields.- Added new marker trait
IsPusTelemetry
implemented byPusTmCreator
andPusTmReader
. - Added new marker trait
IsPusTelecommand
implemented byPusTcCreator
andPusTcReader
. metadata_param
getter method for theMetadataPdu
object.Default
impl for CFDPChecksumType
Default
impl for CFDPCommonPduConfig
Fixed
- All
MetadataGenericParam
fields are now public. - New setter method
set_source_and_dest_id
forCommonPduConfig
.
[v0.6.0] 2023-07-06
Added
- Added new
util
module which contains the following (new) helper modules:UnsignedEnum
trait as an abstraction for unsigned byte fields with variable lengths. It is not tied to the ECSS PFC value like theEcssEnumeration
trait. The method to retrieve the size of the unsigned enumeration in bytes is now calledsize
.GenericUnsignedByteField<TYPE>
and helper typedefsUnsignedU8
,UnsignedU16
,UnsignedU32
andUnsignedU64
as helper types implementingUnsignedEnum
UnsignedByteField
as a type-erased helper.
- Initial CFDP support: Added PDU packet implementation.
- Added
SerializablePusPacket
as a generic abstraction for PUS packets which are writable. - Added new
PusTmZeroCopyWriter
class which allows to set fields on a raw TM packet, which might be more efficient that modification and re-writing a packet with thePusTm
object.
Changed
- The
EcssEnumeration
now requires theUnsignedEnum
trait and only adds thepfc
method to it. - Renamed
byte_width
usages tosize
(part of newUnsignedEnum
trait) - Moved
ecss::CRC_CCITT_FALSE
CRC constant to the root module. This CRC type is not just used by the PUS standard, but by the CCSDS Telecommand standard and the CFDP standard as well.
[v0.5.4] 2023-02-12
Added
Clone
trait requirement fortime::cds::ProvidesDaysLen
trait.- Added
Copy
andClone
derives forDaysLen16Bits
andDaysLen24Bits
.
[v0.5.3] 2023-02-05
Added
num_enum
dependency to avoid boilerplate code for primtive to enum conversions, for example for the PUS subservices.ecss.event
module containing aSubservice
enum.ecss.verification
module containing aSubservice
enum.ecss.scheduling
module containing aSubservice
enum and some other helper enumerations.ecss.hk
module containing aSubservice
enum.
Changed
- Added missing Service IDs to
ecss.PusServiceId
and marked in#[non_exhaustive]
.
Fixed
time.UnixTimestamp
: All constructors andFrom
conversions now use thenew
constructor, which should cause a correct conversion of 0 subsecond milliseconds to aNone
value.
[v0.5.2] 2023-01-26
Added
- Added
.gitignore
.
Fixed
- Correct implementation of Trait
PartialEq
forPusTc
andPusTm
. The previous auto-derivation were incorrect because they also compared fields unrelated to the raw byte representation.
Changed
- Renamed
PusTc
raw
method toraw_bytes
and add better docs to avoid confusion. Deprecateraw
to avoid breaking change. - Added
raw_bytes
method toPusTm
.
[v0.5.1] 2023-01-22
Added
time::cds::TimeProvider
- Add
Ord
andPartialOrd
, use customPartialEq
impl to account for precision correctly. - Add
precision_as_ns
function which converts microsecond and picosecond precision values into nanoseconds. - Add conversion trait to convert
cds::TimeProvider<DaysLen16Bits>
intocds::TimeProvider<DaysLen24Bits>
and vice-versa.
- Add
time::UnixTimestamp
- Add
Ord
andPartialOrd
implementations. - Add
Add<Duration>
andAddAssign<Duration>
implementations.
- Add
Fixed
time::cds::TimeProvider
: Fixed a bug where subsecond milliseconds were not accounted for when the provider has no submillisecond precision.
[v0.5.0] 2023-01-20
The timestamp of PusTm
is now optional. See Added and Changed section for details.
Added
PusTmSecondaryHeader
: Newnew_simple_no_timestamp
API to create secondary header without timestamp.PusTm
: Addnew_simple_no_timestamp
method to create TM without timestamp- New
UnixTimestamp
abstraction which contains the unix seconds as ani64
and an optional subsecond millisecond counter (u16
) MS_PER_DAY
constant.- CUC: Added
from_date_time
andfrom_unix_stamp
constructors for time provider. - CUC: Add
Add<Duration>
andAddAssign<Duration>
impl for time provider.
CDS time module
- Implement
Add<Duration>
andAddAssign<Duration>
for time providers, which allows easily adding offsets to the providers. - Implement
TryFrom<DateTime<Utc>>
for time providers. get_dyn_time_provider_from_bytes
: Requiresalloc
support and returns the correctTimeProvider
instance wrapped as a boxed trait objectBox<DynCdsTimeProvider>
by checking the length of days field.- Added constructor function to create the time provider
from
chrono::DateTime<Utc>
and a generic UNIX timestamp (i64
seconds and subsecond milliseconds). MAX_DAYS_24_BITS
which contains maximum value which can be supplied to the days field of a CDS time provider with 24 bits days field width.- New
CdsTimestamp
trait which encapsulates common fields for all CDS time providers. from_unix_secs_with_u24_days
andfrom_unix_secs_with_u16_days
which create the time provider from aUnixTimestamp
reference.from_dt_with_u16_days
,from_dt_with_u24_days
and their..._us_precision
and..._ps_precision
variants which allow to create time providers from achrono::DateTime<Utc>
.- Add
from_bytes_with_u24_days
andfrom_bytes_with_u16_days
associated methods
Changed
- (breaking)
unix_epoch_to_ccsds_epoch
: Expect and returni64
instead ofu64
now. - (breaking)
ccsds_epoch_to_unix_epoch
: Expect and returni64
instead ofu64
now. - (breaking)
PusTmSecondaryHeader
: Timestamp is optional now, which translates to a timestamp of size 0. - (breaking):
PusTm
: Renamedtime_stamp
method totimestamp
, also returnsOptional<&'src_data [u8]>
now. - (breaking):
PusTmSecondaryHeader
: Renamedtime_stamp
field totimestamp
for consistency. - (breaking): Renamed
from_now_with_u24_days_and_us_prec
tofrom_now_with_u24_days_us_precision
. Also did the same for theu16
variant. - (breaking): Renamed
from_now_with_u24_days_and_ps_prec
tofrom_now_with_u24_days_ps_precision
. Also did the same for theu16
variant. CcsdsTimeProvider
trait (breaking):- Add new
unix_stamp
method returning the newUnixTimeStamp
struct. - Add new
subsecond_millis
method returning counterOption<u16>
. - Default impl for
unix_stamp
which re-usessubsecond_millis
and existingunix_seconds
method.
- Add new
TimestampError
(breaking): AddDateBeforeCcsdsEpoch
error type because new CDS API allow supplying invalid date times before CCSDS epoch. MakeTimestampError
with#[non_exhaustive]
attribute to prevent future breakages if new error variants are added.
[v0.4.2] 14.01.2023
Fixed
- CDS timestamp: Fixed another small logic error for stamp creation from the current time with picosecond precision. PR: #8
[v0.4.1] 14.01.2023
Fixed
- CDS timestamp: The conversion function from the current time were buggy when specifying picoseconds precision, which could lead to overflow multiplications and/or incorrect precision fields. PR: #7
[v0.4.0] 10.01.2023
Fixed
- Remove
Default
derive on CDS time provider. This can lead to uninitialized preamble fields.
Changed
serde
support is now optional and behind theserde
feature.PusTcSecondaryHeaderT
trait renamed toGenericPusTcSecondaryHeader
.PusTmSecondaryHeaderT
trait renamed toGenericPusTmSecondaryHeader
.SpHeader
: Formertc
andtm
methods now namedtc_unseg
andtm_unseg
. Formernew
method now callednew_from_single_fields
.SpHeader
: Renamedfrom_bytes
tofrom_be_bytes
. The function now returns the remaining slice as well.- All CDS specific functionality was moved into the
cds
submodule of thetime
module.CdsShortTimeProvider
was renamed toTimeProvider
. PR: #3
Added
SpHeader
getter functionsp_header
added forPusTc
PR: #6- Added PFC enumerations:
ecss::UnsignedPfc
andecss::RealPfc
. PR: #5 - Added
std::error::Error
implementation for all error enumerations if thestd
feature is enabled. - CUC timestamp implementation as specified in CCSDS 301.0-B-4 section 3.2. PR: https://egit.irs.uni-stuttgart.de/rust/spacepackets/pulls/4/files
- ACII timestamps as specified in CCSDS 301.0-B-4 section 3.5.
- Added MSRV in
Cargo.toml
with therust-version
field set to Rust 1.60. serde
Serialize
andDeserialize
added to all types.- Added
const
constructors forPacketId
,PacketSeqCtrl
andSpHeader
. - Added
PartialEq
andEq
derive
s toTimeProvider
. SpHeader
: Added serialization function into raw formatwrite_to_be_bytes
.- Added 24-bit day field support for CDS short. The bit width is configured at type level
via a generic parameter type passed to the
cds::TimeProvider
- Added submillisecond precision support for
cds::TimeProvider
[v0.3.1] 03.12.2022
- Small fix for faulty docs.rs build
[v0.3.0] 01.12.2022
Added
EcssEnumerationExt
trait which implementsDebug
,Copy
,Clone
,PartialEq
andEq
in addition toEcssEnumeration
Changed
EcssEnumeration
trait: Renamewrite_to_bytes
towrite_to_be_bytes
[v0.2.0] 13.09.2022
Added
- Basic support for ECSS enumeration types for u8, u16, u32 and u64
Changed
- Better names for generic error enumerations:
PacketError
renamed toByteConversionError
- CCSDS module:
ssc
abbreviations fully replaced by better nameseq_count
- Time module:
CcsdsTimeProvider::date_time
now hasOption<DateTime<Utc>>
as a returnvalue instead ofDateTime<Utc>
PusTc
andPusTm
:new_from_raw_slice
renamed to simplerfrom_bytes
[v0.1.0] 16.08.2022
Initial release with CCSDS Space Packet Primary Header implementation and basic PUS TC and TM implementations.