Class for receiving serialized agxSDK::Simulation:s from remote host.
More...
#include <CoSimulationClient.h>
Class for receiving serialized agxSDK::Simulation:s from remote host.
Definition at line 33 of file CoSimulationClient.h.
◆ CoSimulationClient()
| agxNet::CoSimulationClient::CoSimulationClient |
( |
const IPAddress & |
address | ) |
|
Constructor.
- Parameters
-
| address | - Address of server running a simulation |
◆ ~CoSimulationClient()
| virtual agxNet::CoSimulationClient::~CoSimulationClient |
( |
| ) |
|
|
protectedvirtual |
◆ allocateObserverVector()
| void agx::Referenced::allocateObserverVector |
( |
| ) |
const |
|
protectedinherited |
◆ as() [1/2]
template<typename T >
| T* agx::Referenced::as |
( |
| ) |
|
|
inherited |
◆ as() [2/2]
template<typename T >
| const T* agx::Referenced::as |
( |
| ) |
const |
|
inherited |
◆ asSafe() [1/2]
template<typename T >
| T* agx::Referenced::asSafe |
( |
| ) |
|
|
inherited |
◆ asSafe() [2/2]
template<typename T >
| const T* agx::Referenced::asSafe |
( |
| ) |
const |
|
inherited |
◆ checkConnection()
| bool agxNet::CoSimulationClient::checkConnection |
( |
| ) |
|
◆ connectToServer()
| bool agxNet::CoSimulationClient::connectToServer |
( |
| ) |
|
|
protected |
◆ deleteUsingDeleteHandler()
| void agx::Referenced::deleteUsingDeleteHandler |
( |
| ) |
const |
|
protectedinherited |
◆ dropConnection()
| virtual void agxNet::CoSimulationBase::dropConnection |
( |
| ) |
|
|
virtualinherited |
◆ getDeleteHandler()
◆ getMessage()
◆ getReferenceCount()
| int agx::Referenced::getReferenceCount |
( |
| ) |
const |
|
inherited |
- Returns
- the number pointers currently referencing this object.
◆ handleConnectionDrop()
| virtual void agxNet::CoSimulationClient::handleConnectionDrop |
( |
| ) |
|
|
protectedvirtual |
◆ initInput()
◆ is()
template<typename T >
| bool agx::Referenced::is |
( |
| ) |
const |
|
inherited |
◆ isConnected()
| virtual bool agxNet::CoSimulationBase::isConnected |
( |
| ) |
|
|
virtualinherited |
- Returns
- true if we are connected to a remote party
◆ isWaitingForConnection()
| bool agxNet::CoSimulationClient::isWaitingForConnection |
( |
| ) |
const |
Is the client still waiting for connection?
◆ preloadScript()
| bool agxNet::CoSimulationClient::preloadScript |
( |
const agx::String & |
filename | ) |
|
Preloads the scene, parsing the file and obtaining information about input and output sizes.
- Parameters
-
| filename | The name of the script (python or lua) file. Has to have a buildScene(sim, app) function. |
- Return values
-
| Has | the loading succeeded? |
◆ receiveData()
| size_t agxNet::CoSimulationBase::receiveData |
( |
uint8_t * |
data, |
|
|
size_t |
numBytes |
|
) |
| |
|
protectedinherited |
Receive data from remote party.
- Parameters
-
| data | - pointer to address where data will be written |
| numBytes | - size of memory storage. |
- Returns
- number of bytes read.
◆ receivePacket()
| void agxNet::CoSimulationBase::receivePacket |
( |
Header & |
header | ) |
|
|
protectedinherited |
◆ reference()
| void agx::Referenced::reference |
( |
void * |
ptr = nullptr | ) |
const |
|
inherited |
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
◆ sendData()
| size_t agxNet::CoSimulationBase::sendData |
( |
const uint8_t * |
data, |
|
|
size_t |
numBytes |
|
) |
| |
|
protectedinherited |
Transmit data to remote party.
Data block can be chopped up into smaller chunks.
- Parameters
-
| data | - bit stream that should be transmitted to remote client |
| numBytes | - number of bytes to be transmitted. |
- Returns
- number of bytes sent
◆ sendPacket()
| void agxNet::CoSimulationBase::sendPacket |
( |
Header & |
header | ) |
|
|
protectedinherited |
◆ setDeleteHandler()
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
◆ setTimeStep()
| void agxNet::CoSimulationClient::setTimeStep |
( |
double |
timeStep | ) |
|
◆ stepInput()
◆ unreference()
| void agx::Referenced::unreference |
( |
void * |
ptr = nullptr | ) |
const |
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
◆ unreference_nodelete()
| void agx::Referenced::unreference_nodelete |
( |
| ) |
const |
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
◆ ValidateCast()
template<typename T >
| static bool agx::Referenced::ValidateCast |
( |
const Referenced * |
object | ) |
|
|
staticinherited |
◆ waitForConnection()
| virtual bool agxNet::CoSimulationClient::waitForConnection |
( |
| ) |
|
|
virtual |
◆ m_buffer
◆ m_connectionMutex
| agx::Mutex agxNet::CoSimulationBase::m_connectionMutex |
|
protectedinherited |
◆ m_isShutdown
| bool agxNet::CoSimulationBase::m_isShutdown |
|
protectedinherited |
◆ m_mutex
| Mutex agx::Referenced::m_mutex |
|
mutableprotectedinherited |
◆ m_observers
|
|
mutableprotectedinherited |
◆ m_refCount
| AtomicValue agx::Referenced::m_refCount |
|
mutableprotectedinherited |
◆ m_socket
The documentation for this class was generated from the following file: