New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel groups (legacy layers) #147
base: master
Are you sure you want to change the base?
Conversation
johannesvollmer
commented
Jan 3, 2022
•
edited
edited
- add separate tests for the channel name parser and collector
- add builder methods
- test for specific channels in particular
- add user channelfilter?
- revisit public interface and add convenience methods
- examples
- Guide Update
let new_child_groups = HashMap::with_capacity(self.child_groups.len()); | ||
let child_groups = self.child_groups.into_iter() | ||
.map(|(name, child)| Ok((name, child.try_map(&mut mapper)?))) | ||
.try_fold( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}) | ||
impl<Channels> ChannelsWriter for GroupChannelsWriter<Channels> where Channels: ChannelsWriter { | ||
fn extract_uncompressed_block(&self, header: &Header, block_index: BlockIndex, output_block_data: &mut [u8]) { | ||
for channels_group in &self.all_channel_groups { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each subgroup will write to the same few first bytes, overwriting each other. Incorporate some kind of offset?
GroupChannelsWriter { channels_list: channels } | ||
GroupChannelsWriter { | ||
all_channel_groups: self.all_channel_groups() | ||
.map(|channel_group: &ChannelGroup| panic!("this uses relative names but expects absolute names, and all will write first byte")/*channel_group.create_channel_group_writer(header)*/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpecificChannels
currently does a lookup based on the channel name, in order to find the byte offset, for each channel. This cannot work as the meta data channels have absolute names while the SpecificChannels
don't
Ok(ChannelGroupsReader { | ||
channels: channel_groups, | ||
indexed_channels, | ||
let reader = self.read_channels.create_channels_reader(header, &group_selected_channel_indices); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point, meta data contains fully qualified names, but the specific channels and any channels must work with relative local names. Pass some kind of string map instead of only indices?