added interface points to VoxelScriptingInterface to access stats from _voxelPacketSender

This commit is contained in:
ZappoMan 2013-11-10 12:23:44 -08:00
parent 1a6efea5c0
commit 43a4253689
2 changed files with 38 additions and 6 deletions

View file

@ -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();
}

View file

@ -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