das2C
das core C utilities (v3)
Loading...
Searching...
No Matches
stream_priv.h
Go to the documentation of this file.
1/* Copyright (C) 2026 Chris Piker <chris-piker@uiowa.edu>
2 *
3 * This file is part of das2C, the Core Das2 C Library.
4 *
5 * Das2C is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License version 2.1 as published
7 * by the Free Software Foundation.
8 *
9 * Das2C is distributed in the hope that it will be useful, but WITHOUT ANY
10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * version 2.1 along with das2C; if not, see <http://www.gnu.org/licenses/>.
16 */
17
23#ifndef _das_stream_priv_h_
24#define _das_stream_priv_h_
25
26#include <das3/stream.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/* Why aren't these functions public?
33 *
34 * The dataset builder (builder.c) is the only caller. It shadows each
35 * dataset into the reader's stream while the stream is open, so lookups by
36 * packet ID work without the stream owning it, then hands ownership over
37 * with takeDesc when the stream closes. Together they equal
38 * DasStream_addDesc() split in time. Public, v3.0 would freeze that
39 * half-owned state for everyone. If a stream filter ever needs it, move it
40 * to stream.h then; adding a function is a compatible change.
41 */
42
59
76DasErrCode DasStream_takeDesc(DasStream* pThis, DasDesc* pDesc, int nPktId);
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif /* _das_stream_priv_h_ */
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition defs.h:189
Objects representing a single das stream.
Base structure for Stream Header Items.
Definition descriptor.h:74
Describes the stream itself, in particular the compression used, current packetDescriptors,...
Definition stream.h:91
DasErrCode DasStream_takeDesc(DasStream *pThis, DasDesc *pDesc, int nPktId)
Take ownership of a dataset (DasDs or PktDesc)
DasErrCode DasStream_shadowDesc(DasStream *pThis, DasDesc *pDesc, int nPktId)
Loosely attach a dataset (DasDs or PktDesc) to this stream.