Skip to content

Commit

Permalink
Improve TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Jan 31, 2024
1 parent 3696080 commit 5be7c26
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
12 changes: 6 additions & 6 deletions zenoh/src/net/routing/hat/linkstate_peer/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ fn send_sourced_queryable_to_net_childs(
node_id: routing_context,
},
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: *qabl_info,
}),
Expand Down Expand Up @@ -181,7 +181,7 @@ fn propagate_simple_queryable(
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: info,
}),
Expand Down Expand Up @@ -353,7 +353,7 @@ fn send_forget_sourced_queryable_to_net_childs(
node_id: routing_context,
},
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand All @@ -377,7 +377,7 @@ fn propagate_forget_simple_queryable(tables: &mut Tables, res: &mut Arc<Resource
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down Expand Up @@ -493,7 +493,7 @@ pub(super) fn undeclare_client_queryable(
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down Expand Up @@ -526,7 +526,7 @@ pub(super) fn queries_new_face(tables: &mut Tables, face: &mut Arc<FaceState>) {
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: info,
}),
Expand Down
6 changes: 3 additions & 3 deletions zenoh/src/net/routing/hat/p2p_peer/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ fn propagate_simple_queryable(
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: info,
}),
Expand Down Expand Up @@ -170,7 +170,7 @@ fn propagate_forget_simple_queryable(tables: &mut Tables, res: &mut Arc<Resource
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down Expand Up @@ -211,7 +211,7 @@ pub(super) fn undeclare_client_queryable(
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down
26 changes: 13 additions & 13 deletions zenoh/src/net/routing/hat/router/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn send_sourced_subscription_to_net_childs(
node_id: routing_context,
},
body: DeclareBody::DeclareSubscriber(DeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
wire_expr: key_expr,
ext_info: *sub_info,
}),
Expand Down Expand Up @@ -106,7 +106,7 @@ fn propagate_simple_subscription_to(
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareSubscriber(DeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
wire_expr: key_expr,
ext_info: *sub_info,
}),
Expand Down Expand Up @@ -363,7 +363,7 @@ fn send_forget_sourced_subscription_to_net_childs(
node_id: routing_context.unwrap_or(0),
},
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand All @@ -387,7 +387,7 @@ fn propagate_forget_simple_subscription(tables: &mut Tables, res: &Arc<Resource>
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down Expand Up @@ -426,7 +426,7 @@ fn propagate_forget_simple_subscription_to_peers(tables: &mut Tables, res: &Arc<
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down Expand Up @@ -591,7 +591,7 @@ pub(super) fn undeclare_client_subscription(
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand All @@ -613,7 +613,7 @@ fn forget_client_subscription(

pub(super) fn pubsub_new_face(tables: &mut Tables, face: &mut Arc<FaceState>) {
let sub_info = SubscriberInfo {
reliability: Reliability::Reliable, // @TODO
reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers
mode: Mode::Push,
};

Expand All @@ -627,7 +627,7 @@ pub(super) fn pubsub_new_face(tables: &mut Tables, face: &mut Arc<FaceState>) {
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareSubscriber(DeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
wire_expr: key_expr,
ext_info: sub_info,
}),
Expand All @@ -654,7 +654,7 @@ pub(super) fn pubsub_new_face(tables: &mut Tables, face: &mut Arc<FaceState>) {
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareSubscriber(DeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
wire_expr: key_expr,
ext_info: sub_info,
}),
Expand Down Expand Up @@ -731,7 +731,7 @@ pub(super) fn pubsub_tree_change(
for sub in subs {
if *sub == tree_id {
let sub_info = SubscriberInfo {
reliability: Reliability::Reliable, // @TODO
reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers
mode: Mode::Push,
};
send_sourced_subscription_to_net_childs(
Expand Down Expand Up @@ -795,7 +795,7 @@ pub(super) fn pubsub_linkstate_change(tables: &mut Tables, zid: &ZenohId, links:
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareSubscriber(
UndeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
ext_wire_expr: WireExprType { wire_expr },
},
),
Expand All @@ -810,7 +810,7 @@ pub(super) fn pubsub_linkstate_change(tables: &mut Tables, zid: &ZenohId, links:
face_hat_mut!(dst_face).local_subs.insert(res.clone());
let key_expr = Resource::decl_key(res, dst_face);
let sub_info = SubscriberInfo {
reliability: Reliability::Reliable, // TODO
reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers
mode: Mode::Push,
};
dst_face.primitives.send_declare(RoutingContext::with_expr(
Expand All @@ -819,7 +819,7 @@ pub(super) fn pubsub_linkstate_change(tables: &mut Tables, zid: &ZenohId, links:
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareSubscriber(DeclareSubscriber {
id: 0, // TODO
id: 0, // @TODO use proper SubscriberId (#703)
wire_expr: key_expr,
ext_info: sub_info,
}),
Expand Down
20 changes: 10 additions & 10 deletions zenoh/src/net/routing/hat/router/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ fn send_sourced_queryable_to_net_childs(
node_id: routing_context,
},
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: *qabl_info,
}),
Expand Down Expand Up @@ -262,7 +262,7 @@ fn propagate_simple_queryable(
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: info,
}),
Expand Down Expand Up @@ -494,7 +494,7 @@ fn send_forget_sourced_queryable_to_net_childs(
node_id: routing_context,
},
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand All @@ -518,7 +518,7 @@ fn propagate_forget_simple_queryable(tables: &mut Tables, res: &mut Arc<Resource
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down Expand Up @@ -558,7 +558,7 @@ fn propagate_forget_simple_queryable_to_peers(tables: &mut Tables, res: &mut Arc
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down Expand Up @@ -727,7 +727,7 @@ pub(super) fn undeclare_client_queryable(
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
}),
},
Expand Down Expand Up @@ -760,7 +760,7 @@ pub(super) fn queries_new_face(tables: &mut Tables, face: &mut Arc<FaceState>) {
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: info,
}),
Expand Down Expand Up @@ -789,7 +789,7 @@ pub(super) fn queries_new_face(tables: &mut Tables, face: &mut Arc<FaceState>) {
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: info,
}),
Expand Down Expand Up @@ -889,7 +889,7 @@ pub(super) fn queries_linkstate_change(tables: &mut Tables, zid: &ZenohId, links
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::UndeclareQueryable(
UndeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
ext_wire_expr: WireExprType { wire_expr },
},
),
Expand All @@ -912,7 +912,7 @@ pub(super) fn queries_linkstate_change(tables: &mut Tables, zid: &ZenohId, links
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: key_expr,
ext_info: info,
}),
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/net/runtime/adminspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ impl AdminSpace {
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
body: DeclareBody::DeclareQueryable(DeclareQueryable {
id: 0, // TODO
id: 0, // @TODO use proper QueryableId (#703)
wire_expr: [&root_key, "/**"].concat().into(),
ext_info: QueryableInfo {
complete: 0,
Expand Down

0 comments on commit 5be7c26

Please sign in to comment.