Statistics.js 579 B

123456789101112131415161718192021222324
  1. var Sequence = require('./Sequence');
  2. var Util = require('util');
  3. var Packets = require('../packets');
  4. module.exports = Statistics;
  5. Util.inherits(Statistics, Sequence);
  6. function Statistics(callback) {
  7. Sequence.call(this, callback);
  8. }
  9. Statistics.prototype.start = function() {
  10. this.emit('packet', new Packets.ComStatisticsPacket);
  11. };
  12. Statistics.prototype['StatisticsPacket'] = function (packet) {
  13. this.end(null, packet);
  14. };
  15. Statistics.prototype.determinePacket = function(firstByte, parser) {
  16. if (firstByte === 0x55) {
  17. return Packets.StatisticsPacket;
  18. }
  19. };