Entities octree sending functions JSDoc

This commit is contained in:
David Rowe 2018-02-25 14:15:39 +13:00
parent 440c0aa0d9
commit a8e05824cd
2 changed files with 80 additions and 2 deletions

View file

@ -35,48 +35,125 @@ private slots:
void cleanupManagedObjects();
public slots:
/**jsdoc
* Set the maximum number of entity packets that the client send per second.
* @function Entities.setPacketsPerSecond
* @param {number} packetsPerSecond - Integer maximum number of entity packets that the client can send per second.
*/
/// set the max packets per second send rate
void setPacketsPerSecond(int packetsPerSecond) { return _packetSender->setPacketsPerSecond(packetsPerSecond); }
/**jsdoc
* Get the maximum number of entity packets that the client can send per second.
* @function Entities.getPacketsPerSecond
* @returns {number} Integer maximum number of entity packets that the client can send per second.
*/
/// get the max packets per second send rate
int getPacketsPerSecond() const { return _packetSender->getPacketsPerSecond(); }
/// does a particle server exist to send to
/**jsdoc
* Check whether servers exist for the client to send entity packets to.
* @function Entities.serversExist
* @returns {boolean} <code>true</code> if servers exist for the client to send entity packets to, <code>false</code>
* otherwise.
*/
/// does a server exist to send to
bool serversExist() const { return _packetSender->serversExist(); }
/**jsdoc
* Check whether the client has entity packets waiting to be sent.
* @function Entities.hasPacketsToSend
* @returns {boolean} <code>true</code> if the client has entity packets waiting to be sent, <code>false</code> otherwise.
*/
/// are there packets waiting in the send queue to be sent
bool hasPacketsToSend() const { return _packetSender->hasPacketsToSend(); }
/**jsdoc
* Get the number of entity packets the client has waiting to be sent.
* @function Entities.packetsToSendCount
* @returns {number} Integer number of entity packets the client has waiting to be sent.
*/
/// how many packets are there in the send queue waiting to be sent
int packetsToSendCount() const { return (int)_packetSender->packetsToSendCount(); }
/**jsdoc
* Get the entity packets per second send rate of the client over its lifetime.
* @function Entities.getLifetimePPS
* @returns {number} Entity packets per second send rate of the client over its lifetime.
*/
/// returns the packets per second send rate of this object over its lifetime
float getLifetimePPS() const { return _packetSender->getLifetimePPS(); }
/**jsdoc
* Get the entity bytes per second send rate of the client over its lifetime.
* @function Entities.getLifetimeBPS
* @returns {number} Entity bytes per second send rate of the client over its lifetime.
*/
/// returns the bytes per second send rate of this object over its lifetime
float getLifetimeBPS() const { return _packetSender->getLifetimeBPS(); }
/**jsdoc
* Get the entity packets per second queued rate of the client over its lifetime.
* @function Entities.getLifetimePPSQueued
* @returns {number} Entity packets per second queued rate of the client over its lifetime.
*/
/// returns the packets per second queued rate of this object over its lifetime
float getLifetimePPSQueued() const { return _packetSender->getLifetimePPSQueued(); }
/**jsdoc
* Get the entity bytes per second queued rate of the client over its lifetime.
* @function Entities.getLifetimeBPSQueued
* @returns {number} Entity bytes per second queued rate of the client over its lifetime.
*/
/// returns the bytes per second queued rate of this object over its lifetime
float getLifetimeBPSQueued() const { return _packetSender->getLifetimeBPSQueued(); }
/**jsdoc
* Get the lifetime of the client from the first entity packet sent until now, in microseconds.
* @function Entities.getLifetimeInUsecs
* @returns {number} Lifetime of the client from the first entity packet sent until now, in microseconds.
*/
/// returns lifetime of this object from first packet sent to now in usecs
long long unsigned int getLifetimeInUsecs() const { return _packetSender->getLifetimeInUsecs(); }
/// returns lifetime of this object from first packet sent to now in usecs
/**jsdoc
* Get the lifetime of the client from the first entity packet sent until now, in seconds.
* @function Entities.getLifetimeInSeconds
* @returns {number} Lifetime of the client from the first entity packet sent until now, in seconds.
*/
/// returns lifetime of this object from first packet sent to now in secs
float getLifetimeInSeconds() const { return _packetSender->getLifetimeInSeconds(); }
/**jsdoc
* Get the total number of entity packets sent by the client over its lifetime.
* @function Entities.getLifetimePacketsSent
* @returns {number} The total number of entity packets sent by the client over its lifetime.
*/
/// returns the total packets sent by this object over its lifetime
long long unsigned int getLifetimePacketsSent() const { return _packetSender->getLifetimePacketsSent(); }
/**jsdoc
* Get the total bytes of entity packets sent by the client over its lifetime.
* @function Entities.getLifetimeBytesSent
* @returns {number} The total bytes of entity packets sent by the client over its lifetime.
*/
/// returns the total bytes sent by this object over its lifetime
long long unsigned int getLifetimeBytesSent() const { return _packetSender->getLifetimeBytesSent(); }
/**jsdoc
* Get the total number of entity packets queued by the client over its lifetime.
* @function Entities.getLifetimePacketsQueued
* @returns {number} The total number of entity packets queued by the client over its lifetime.
*/
/// returns the total packets queued by this object over its lifetime
long long unsigned int getLifetimePacketsQueued() const { return _packetSender->getLifetimePacketsQueued(); }
/**jsdoc
* Get the total bytes of entity packets queued by the client over its lifetime.
* @function Entities.getLifetimeBytesQueued
* @returns {number} The total bytes of entity packets queued by the client over its lifetime.
*/
/// returns the total bytes queued by this object over its lifetime
long long unsigned int getLifetimeBytesQueued() const { return _packetSender->getLifetimeBytesQueued(); }

View file

@ -25,6 +25,7 @@ exports.handlers = {
'../../libraries/avatars/src',
'../../libraries/controllers/src/controllers/',
'../../libraries/entities/src',
'../../libraries/octree/src',
'../../libraries/networking/src',
'../../libraries/pointers/src',
'../../libraries/shared/src',