mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
added interface points to VoxelScriptingInterface to access stats from _voxelPacketSender
This commit is contained in:
parent
1a6efea5c0
commit
43a4253689
2 changed files with 38 additions and 6 deletions
|
@ -42,7 +42,3 @@ void VoxelScriptingInterface::queueVoxelDelete(float x, float y, float z, float
|
|||
_voxelPacketSender.queueVoxelEditMessages(PACKET_TYPE_ERASE_VOXEL, 1, &deleteVoxelDetail);
|
||||
}
|
||||
|
||||
|
||||
int VoxelScriptingInterface::packetsToSendCount() const {
|
||||
return _voxelPacketSender.packetsToSendCount();
|
||||
}
|
||||
|
|
|
@ -50,8 +50,44 @@ public slots:
|
|||
/// \param scale the scale of the voxel (in VS space)
|
||||
void queueVoxelDelete(float x, float y, float z, float scale);
|
||||
|
||||
/// get the current number of pending, queued, but unsent packets
|
||||
int packetsToSendCount() const;
|
||||
/// does a voxel server exist to send to
|
||||
bool voxelServersExist() const { return _voxelPacketSender.voxelServersExist(); }
|
||||
|
||||
/// are there packets waiting in the send queue to be sent
|
||||
bool hasPacketsToSend() const { return _voxelPacketSender.hasPacketsToSend(); }
|
||||
|
||||
/// how many packets are there in the send queue waiting to be sent
|
||||
int packetsToSendCount() const { return _voxelPacketSender.packetsToSendCount(); }
|
||||
|
||||
/// returns the packets per second send rate of this object over its lifetime
|
||||
float getLifetimePPS() const { return _voxelPacketSender.getLifetimePPS(); }
|
||||
|
||||
/// returns the bytes per second send rate of this object over its lifetime
|
||||
float getLifetimeBPS() const { return _voxelPacketSender.getLifetimeBPS(); }
|
||||
|
||||
/// returns the packets per second queued rate of this object over its lifetime
|
||||
float getLifetimePPSQueued() const { return _voxelPacketSender.getLifetimePPSQueued(); }
|
||||
|
||||
/// returns the bytes per second queued rate of this object over its lifetime
|
||||
float getLifetimeBPSQueued() const { return _voxelPacketSender.getLifetimeBPSQueued(); }
|
||||
|
||||
/// returns lifetime of this object from first packet sent to now in usecs
|
||||
long long unsigned int getLifetimeInUsecs() const { return _voxelPacketSender.getLifetimeInUsecs(); }
|
||||
|
||||
/// returns lifetime of this object from first packet sent to now in usecs
|
||||
float getLifetimeInSeconds() const { return _voxelPacketSender.getLifetimeInSeconds(); }
|
||||
|
||||
/// returns the total packets sent by this object over its lifetime
|
||||
long long unsigned int getLifetimePacketsSent() const { return _voxelPacketSender.getLifetimePacketsSent(); }
|
||||
|
||||
/// returns the total bytes sent by this object over its lifetime
|
||||
long long unsigned int getLifetimeBytesSent() const { return _voxelPacketSender.getLifetimeBytesSent(); }
|
||||
|
||||
/// returns the total packets queued by this object over its lifetime
|
||||
long long unsigned int getLifetimePacketsQueued() const { return _voxelPacketSender.getLifetimePacketsQueued(); }
|
||||
|
||||
/// returns the total bytes queued by this object over its lifetime
|
||||
long long unsigned int getLifetimeBytesQueued() const { return _voxelPacketSender.getLifetimeBytesQueued(); }
|
||||
|
||||
private:
|
||||
/// attached VoxelEditPacketSender that handles queuing and sending of packets to VS
|
||||
|
|
Loading…
Reference in a new issue