USLP reader getter functions #203
@@ -25,6 +25,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Added `SequenceCounterOnFile` which persists the sequence counter by writing it to a file.
|
||||
- Added `SequenceCounter::set` method which allows manually setting an initial value.
|
||||
- Added `CcsdsPacketReader::raw_data` full data getter.
|
||||
- `UslpFrameCreator` constructor
|
||||
- Additional reader methods on `UslpFrameReader`
|
||||
|
||||
## Removed
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ pub struct PrimaryHeader {
|
||||
pub source_or_dest_field: SourceOrDestField,
|
||||
/// Virtual channel ID.
|
||||
pub vc_id: u6,
|
||||
/// MAP ID.
|
||||
/// Multiplexer Access Point (MAP) ID.
|
||||
pub map_id: u4,
|
||||
frame_len_field: u16,
|
||||
/// Bypass sequence control flag.
|
||||
@@ -642,6 +642,29 @@ impl<'buf> TransferFrameReader<'buf> {
|
||||
self.primary_header.len_frame()
|
||||
}
|
||||
|
||||
/// Virtual channel ID.
|
||||
#[inline]
|
||||
pub fn vc_id(&self) -> u6 {
|
||||
self.primary_header.vc_id
|
||||
}
|
||||
/// Multiplexer Access Point (MAP) ID.
|
||||
#[inline]
|
||||
pub fn map_id(&self) -> u4 {
|
||||
self.primary_header.map_id
|
||||
}
|
||||
|
||||
/// Spacecraft ID.
|
||||
#[inline]
|
||||
pub fn spacecraft_id(&self) -> u16 {
|
||||
self.primary_header.spacecraft_id
|
||||
}
|
||||
|
||||
/// Source or destination field.
|
||||
#[inline]
|
||||
pub fn source_or_dest_field(&self) -> SourceOrDestField {
|
||||
self.primary_header.source_or_dest_field
|
||||
}
|
||||
|
||||
/// Primary header.
|
||||
#[inline]
|
||||
pub fn primary_header(&self) -> &PrimaryHeader {
|
||||
|
||||
Reference in New Issue
Block a user