AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
CoSimulationClient.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
21
22
23namespace agxSDK
24{
25 class Simulation;
26}
27
28namespace agxNet
29{
30
33 {
34 public:
39 CoSimulationClient( const IPAddress& address );
40
42
44
45 void setTimeStep(double timeStep);
46
53 bool preloadScript(const agx::String& filename);
54
55 bool initInput(const agx::RealVector& input, agx::RealVector& output);
56
57 bool stepInput(const agx::RealVector& input, agx::RealVector& output);
58
61
62 virtual bool waitForConnection();
63
64 protected:
65
67
68 virtual void handleConnectionDrop();
69
71
72 private:
73 IPAddress m_address;
74 bool m_isWaitingForConnection;
75 agx::Timer stepTimer;
76
77 };
78
79}
#define AGXPHYSICS_EXPORT
Base class for multi threaded transferring simulation between a server and a client using sockets.
Class for receiving serialized agxSDK::Simulation:s from remote host.
virtual void handleConnectionDrop()
CoSimulationClient(const IPAddress &address)
Constructor.
bool initInput(const agx::RealVector &input, agx::RealVector &output)
bool stepInput(const agx::RealVector &input, agx::RealVector &output)
void setTimeStep(double timeStep)
virtual bool waitForConnection()
bool preloadScript(const agx::String &filename)
Preloads the scene, parsing the file and obtaining information about input and output sizes.
bool isWaitingForConnection() const
Is the client still waiting for connection?
a structure which holds IP address
Definition Socket.h:117
Base class providing referencing counted objects.
Definition Referenced.h:120
The Timer class permits timing execution speed with the same refinement as the built in hardware cloc...
Definition Timer.h:75
Containins classes for sending/reading data over sockets as well as compression functionality.
Definition MacUtil.h:23
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31