Implemented dto-obj Packet

f_influx-checks
Ruakij 3 years ago
parent 1b6721d242
commit 7dd131d6b5

@ -0,0 +1,46 @@
const PacketType = {
Beacon: 'Beacon',
ProbeRequest: 'ProbeRequest',
ProbeResponse: 'ProbeResponse',
Data: 'Data',
RequestToSend: 'RequestToSend',
ClearToSend: 'ClearToSend',
Acknowledgment: 'Acknowledgment',
BlockAcknowledgment: 'BlockAcknowledgment',
NoData: 'NoData',
Unknown: 'Unknown'
}
class Packet{
timestampMicros;
srcMac;
dstMac;
bssid;
signal;
frequency;
dataRate;
packetType;
}
// Extensions of Packet
class PacketWithSSID extends Packet{
ssid;
}
class BeaconPacket extends PacketWithSSID{}
class ProbeRequestPacket extends PacketWithSSID{}
class ProbeResponsePacket extends PacketWithSSID{}
// Specify exports
module.exports = {
PacketType,
Packet,
PacketWithSSID,
BeaconPacket,
ProbeRequestPacket,
ProbeResponsePacket
};
Loading…
Cancel
Save