Compute Graph Framework SDK Reference  5.16
ILockstepSyncClient.hpp
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
31#ifndef DW_FRAMEWORK_ILOCKSTEP_SYNC_CLIENT_HPP_
32#define DW_FRAMEWORK_ILOCKSTEP_SYNC_CLIENT_HPP_
33
34#include <dw/core/base/Types.h>
35
36namespace dw
37{
38namespace framework
39{
40namespace lockstep
41{
42
44{
51};
52
54{
61};
62
67{
76 dwTime_t timestamp;
81 uint64_t seqNum;
82};
83
88{
89public:
96 virtual void sendDataHeader(const LockstepSyncHeader& header) = 0;
97};
98
103{
104public:
115 virtual bool postProcessData(LockstepSyncDataStatus& result, const LockstepSyncHeader& header) = 0;
116};
117
126// coverity[autosar_cpp14_a0_1_6_violation]
128{
129public:
139 virtual bool wait() = 0;
140
146 virtual void setIterationCount(uint32_t iterationCount) = 0;
147
152 virtual void sendNextTimestamp() = 0;
153
157 virtual void sendTeardownMessage() = 0;
158
166
174
180 virtual dwTime_t getTimeoutUs() const = 0;
181
182 virtual ~ILockstepSyncClient() = default;
183};
184
185} // namespace lockstep
186} // namespace framework
187} // namespace dw
188
189#endif // DW_FRAMEWORK_ILOCKSTEP_SYNC_CLIENT_HPP_
virtual bool postProcessData(LockstepSyncDataStatus &result, const LockstepSyncHeader &header)=0
virtual void sendDataHeader(const LockstepSyncHeader &header)=0
virtual ILockstepSyncClientProducer & getProducer()=0
Return the producer specific interface for the lockstep sync client.
virtual void sendNextTimestamp()=0
Send the next running timestamp of the consumer/producer to the receiving client.
virtual dwTime_t getTimeoutUs() const =0
Return the blocking timeout used to read data.
virtual ILockstepSyncClientConsumer & getConsumer()=0
Return the consumer specific interface for the lockstep sync client.
virtual void setIterationCount(uint32_t iterationCount)=0
virtual void sendTeardownMessage()=0
Send a teardown message to unblock the receiving client.
virtual bool wait()=0
Wait for the consumer or producer to be ready to receive data. This call blocks until the caller is r...
@ LOCKSTEP_SYNC_ADVANCE_PKT
An advance packet with the next running timestamp of the client.
@ LOCKSTEP_SYNC_UNBLOCK
A control packet unblocking the client.
@ LOCKSTEP_SYNC_DATA_HEADER
A data header packet corresponding to data sent by the producer.
@ DATA_DROP
Data is to be dropped by the client.
@ DATA_NOT_READY
Data is not ready to be consumed by the client.
@ DATA_CONSUME
Data is ready to be consumed by the client.
Definition: Buffer.hpp:40