Skip to content

Commit

Permalink
SubscribeById implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeling committed Oct 22, 2024
1 parent 7b47ed9 commit f1b9b71
Show file tree
Hide file tree
Showing 2 changed files with 268 additions and 39 deletions.
3 changes: 3 additions & 0 deletions databroker/src/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ pub struct QueryField {

#[derive(Debug)]
pub struct ChangeNotification {
pub id: i32,
pub update: EntryUpdate,
pub fields: HashSet<Field>,
}
Expand Down Expand Up @@ -774,6 +775,7 @@ impl ChangeSubscription {
// fill unit field always
update.unit.clone_from(&entry.metadata.unit);
notifications.updates.push(ChangeNotification {
id: *id,
update,
fields: notify_fields,
});
Expand Down Expand Up @@ -823,6 +825,7 @@ impl ChangeSubscription {
notify_fields.insert(Field::ActuatorTarget);
}
notifications.updates.push(ChangeNotification {
id: *id,
update,
fields: notify_fields,
});
Expand Down
Loading

0 comments on commit f1b9b71

Please sign in to comment.