# NDN network
1. [Brief NDN Introudction](https://www.cs.princeton.edu/courses/archive/fall18/cos561/papers/NDN18.pdf)
2. [Detail and Comprehensvie NDN Survey Paper](https://www.sciencedirect.com/science/article/pii/S1574013715300599?ref=pdf_download&fr=RR-2&rr=8617ad640e58843c)
3. [A tutorial survey on vehicular communication state of the art, and future research directions](https://www.sciencedirect.com/science/article/pii/S2214209618300901?ref=pdf_download&fr=RR-2&rr=87f801de5db78445)
4. [VANET via named data networking](https://ieeexplore.ieee.org/document/6849267)
5. [Named Data Networking in Vehicular Ad Hoc Networks: State-of-the-Art and Challenges](https://ieeexplore.ieee.org/abstract/document/8624354)
6. [美國放棄dsrc 轉向 c-v2x](https://www.ttia-tw.org/letters.php?wshop=ttia&Opt=detailed&tp=&lang=zh-tw&letters_id=2250774)
## zenoh_trace
### publisher
```
use zenoh::prelude::r#async::*;
#[async_std::main]
async fn main() {
let session = zenoh::open(config::default()).res().await.unwrap();(1)
session.put("key/expression", "value").res().await.unwrap();(2)
session.close().res().await.unwrap();(3)
}
```
(1)zenoh::open will return a config_builder, config stores information including id, medtadata, whoamI,connecting node,and so on. (detail in commons/zenog-config/src/libs)

Config stores connect and listen in node vector. Each node is EndPoint which records protocol, address, metadata, config.(detail in common/zenoh-protocol/endpoint.rs)

What's more, ScoutingConf(include ScoutingMulticastConf and GossipConf) and RoutingConf parameter are set here, but their implementation is not here.
In (zenoh/scouting.rs)

It call Runtime::scout to send Udp packet.(in line 312)
scout message

In response to a scout message, a node will respond to Hello to show that it is reachable.(in commons/zenoh-protocol/scouting/hello.rs)

In Hello message, it consists of "locator". Locator have its node's <key1> = <value1>... information.(in commons/zenoh-protocol/core/locator.rs)

Declare Interest message indicates what kind of key they want. For example, they could collect what node subscribes explicit key.(in commons/zenoh-protocl/network/declare.rs)

(2)-1 session.put will call PutBuilder and call PublisherBuilder(in zenoh/session.rs). PublisherBuilder is to initialize Publisher.(in zenoh/publication.rs)

Publisher will call Publication which calls resolve_put(in zenoh/publication)

send_push is in (zenoh/session.rs),there different type, but handle_data (in zenoh/session.rs) always be called in the end.

Then finally it will use callbacks to push data.
callbacks is SingleOrVec which is in (commons/zenoh-collections/single_or_vec.rs)
(2)-2 matching_listener (undo)
in (zenoh/publication)

(3)not intersting
### subscriber
```
use futures::prelude::*;
use zenoh::prelude::r#async::*;
#[async_std::main]
async fn main() {
let session = zenoh::open(config::default()).res().await.unwrap();(1)
let subscriber = session.declare_subscriber("key/expression").res().await.unwrap();(2)
while let Ok(sample) = subscriber.recv_async().await {
println!("Received: {}", sample);
};(3)
}
```
(1) as mentioned above
(2)
### listen v.s. connect

## geonetworking and TSN
for remote driving: 事先計算分配time sensitive networking sharper.