Skip to content

Commit

Permalink
Merge pull request #81 from boschglobal/feature/subscribe_by_id_imple…
Browse files Browse the repository at this point in the history
…mentation

Subscribe by id Integer32 implementation
  • Loading branch information
rafaeling authored Oct 22, 2024
2 parents d94497e + a8df2f6 commit d0424e9
Show file tree
Hide file tree
Showing 2 changed files with 272 additions and 55 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 @@ -775,6 +776,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 @@ -824,6 +826,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 d0424e9

Please sign in to comment.