CARLA
 
载入中...
搜索中...
未找到
Stream.h
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3// 表明该代码遵循MIT许可协议,可通过对应链接查看协议具体内容
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
9// 引入Carla项目中streaming模块细节相关的MultiStreamState头文件,从命名推测,它可能用于处理多流相关的状态信息,具体功能取决于其内部定义
11// 引入Carla项目中streaming模块细节相关的Stream头文件,大概率是用于构建流相关的功能,比如流的创建、数据传输等操作,其内部应有相应的实现逻辑
13
14namespace carla {
15namespace streaming {
16
17 // 对Stream类型进行定义(通过using关键字起别名),这里将Stream定义为detail::Stream<detail::MultiStreamState>这种模板类型。
18 // 意味着Stream类型代表了一个单向的通道(从注释可知,是用于从服务器向客户端发送数据的通道),并且它基于detail::MultiStreamState相关的状态来进行操作,
19 // 多个客户端可以通过流令牌(stream token,一种可能用于标识和访问流的机制,虽然这里未详细展开说明)来订阅这个流。
20 // 如果没有客户端订阅该流,那么沿着这个流推送(flushed down)的数据将会被丢弃。
21 /// A stream represents an unidirectional channel for sending data from server
22 /// to client. **Multiple** clients can subscribe to this stream using the
23 /// stream token. If no client is subscribed, the data flushed down the stream
24 /// is discarded.
26
27} // namespace streaming
28} // namespace carla
CARLA模拟器的主命名空间。
Definition Carla.cpp:139