WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
DataIOShmemRelay.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX INC 2025. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX INC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX INC.
15******************************************************************************/
16#ifndef UTILS_DATA_IO_SHMEM_RELAY_H
17#define UTILS_DATA_IO_SHMEM_RELAY_H
18
20
21namespace warptwin {
22
44public:
50 DataIOShmemRelay(DataIOBase& map_target, const char* shmem_name, bool is_read = true);
52
55 int16 syncExternal() override;
56protected:
59 int16 _syncWriteShmem();
62 int16 _syncReadShmem();
63
64 int _fd = -1;
65 bool _is_read;
66 void* _addr;
67 uint8* _droot;
70 std::string _created = "";
71};
72
73}
74
75#endif
Definition DataIOBase.h:63
DataIOBase()
Default constructor.
Definition DataIOBase.h:66
std::string _created
Reference for created file to clear on creation.
Definition DataIOShmemRelay.h:70
void * _addr
Pointer to our shared memory.
Definition DataIOShmemRelay.h:66
int _fd
File descriptor for shmem access.
Definition DataIOShmemRelay.h:64
int _data_size
Amount of data space reserved in shmem and allocated.
Definition DataIOShmemRelay.h:68
int16 syncExternal() override
Synchronize DataIO values to shared memory.
Definition DataIOShmemRelay.cpp:96
uint8 * _droot
Pointer for malloc of our data space to copy out of shmem.
Definition DataIOShmemRelay.h:67
~DataIOShmemRelay()
Definition DataIOShmemRelay.cpp:86
DataIOBase & _tgt
Reference information on type and size.
Definition DataIOShmemRelay.h:69
int16 _syncReadShmem()
Read DataIO information from shared memory.
Definition DataIOShmemRelay.cpp:119
DataIOShmemRelay(DataIOBase &map_target, const char *shmem_name, bool is_read=true)
Only constructor for this object – requires mapping target, name for shared memory.
Definition DataIOShmemRelay.cpp:32
int16 _syncWriteShmem()
Write DataIO information to shared memory.
Definition DataIOShmemRelay.cpp:105
bool _is_read
Bool indicating whether this DataIO is read or write.
Definition DataIOShmemRelay.h:65
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22