1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const __1 = require("./..");
|
4 |
|
5 |
|
6 |
|
7 | function mapFromMessage(message) {
|
8 | const macAddressMatch = macAddressRegExp.exec(message.usn);
|
9 | if (macAddressMatch == null) {
|
10 | return null;
|
11 | }
|
12 | const macAddress = macAddressMatch[1].toUpperCase();
|
13 | return new __1.Device(message.remoteAddress, undefined, macAddress, undefined, undefined, undefined, undefined, undefined);
|
14 | }
|
15 | exports.mapFromMessage = mapFromMessage;
|
16 | const macAddressRegExp = /^uuid:.*([0-9a-f]{12})::.*$/i;
|
17 |
|
\ | No newline at end of file |