WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
ExternalInterfaceModel.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. 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, LLC.
15******************************************************************************/
16/*
17Metadata for MS GUI:
18imdata = {"exclude" : True}
19*/
20
21#ifndef MODELS_SUPPORT_EXTERNAL_INTERFACE_MODEL
22#define MODELS_SUPPORT_EXTERNAL_INTERFACE_MODEL
23
24#include <vector>
25
26#include "architecture/Time.h"
27#include "flight/App.h"
32
33namespace warptwin {
34
55 public:
59
61
65
67
71
73
79 void connectExternalSocket(clockwerk::DataIOBase& signal, std::string mode,
80 const std::string &ip, int port);
81
86 void connectExternalSharedMemory(clockwerk::DataIOBase& signal, std::string mode,
87 const std::string shmem_address);
88
93 protected:
94 int16 start() override;
95 int16 execute() override;
96
99 int _syncSockets();
102 int _syncShmem();
103
104 // Where our pointers to relays are held. Note these must be recorded
105 // as DataIOBase
106 std::vector<DataIOSocketRelay*> _socket_relays;
107 std::vector<DataIOShmemRelay*> _shmem_relays;
108 };
109
110}
111
112#endif
#define START_PARAMS
Definition appmacros.h:42
#define END_OUTPUTS
Definition appmacros.h:33
#define END_PARAMS
Definition appmacros.h:47
#define START_OUTPUTS
Definition appmacros.h:28
#define END_INPUTS
Definition appmacros.h:40
#define START_INPUTS
Definition appmacros.h:35
Definition DataIOBase.h:63
Base app class for derived implementation.
Definition App.h:55
Executive derivation specifically to run flight systems.
Definition FlightExecutive.h:46
void connectExternalSharedMemory(clockwerk::DataIOBase &signal, std::string mode, const std::string shmem_address)
Connect a signal to an external shared memory.
Definition ExternalInterfaceModel.cpp:48
virtual ~ExternalInterfaceModel()
Definition ExternalInterfaceModel.cpp:29
int16 execute() override
Definition ExternalInterfaceModel.cpp:63
void connectExternalSocket(clockwerk::DataIOBase &signal, std::string mode, const std::string &ip, int port)
Connect a signal to an external socket.
Definition ExternalInterfaceModel.cpp:38
int _syncSockets()
Synchronize all sockets to external.
Definition ExternalInterfaceModel.cpp:86
std::vector< DataIOShmemRelay * > _shmem_relays
Definition ExternalInterfaceModel.h:107
int _syncShmem()
Synchronize all shared memory to external.
Definition ExternalInterfaceModel.cpp:100
ExternalInterfaceModel(warpos::FlightExecutive &executive)
Definition ExternalInterfaceModel.cpp:24
int16 start() override
Definition ExternalInterfaceModel.cpp:58
std::vector< DataIOSocketRelay * > _socket_relays
Definition ExternalInterfaceModel.h:106
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22