This commit is contained in:
peli 2020-06-22 18:34:29 -07:00
Родитель 97189cc6c7
Коммит 5340aee8de
8 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@ -1,7 +1,7 @@
import { Packet } from "./jdpacket"
import { getDevice } from "./jddevice"
import { bufferEq } from "./jdutils"
import { JD_SERVICE_NUMBER_CTRL, CMD_ADVERTISEMENT_DATA } from "./jdconstants";
import { Packet } from "./packet"
import { getDevice } from "./device"
import { bufferEq } from "./utils"
import { JD_SERVICE_NUMBER_CTRL, CMD_ADVERTISEMENT_DATA } from "./constants";
/**
* A transport layer for the jacdac packets

Просмотреть файл

Просмотреть файл

@ -1,6 +1,6 @@
import { Packet } from "./jdpacket"
import { JD_SERVICE_NUMBER_CTRL } from "./jdconstants"
import { hash, fromHex, idiv, getNumber, NumberFormat, read32, SMap } from "./jdutils"
import { Packet } from "./packet"
import { JD_SERVICE_NUMBER_CTRL } from "./constants"
import { hash, fromHex, idiv, getNumber, NumberFormat, read32, SMap } from "./utils"
const devices_: Device[] = []
export const deviceNames: SMap<string> = {}

Просмотреть файл

@ -1,6 +1,6 @@
require('./jdconstants')
require('./jdutils')
require('./jdpacket')
require('./jddevice')
require('./jdbus')
require('./jdpretty')
require('./constants')
require('./utils')
require('./packet')
require('./device')
require('./bus')
require('./pretty')

Просмотреть файл

@ -1,4 +1,4 @@
import { warn, crc, ALIGN, write16, bufferConcat, toHex, fromHex, error, read32, read16, NumberFormat, getNumber, write32 } from "./jdutils";
import { warn, crc, ALIGN, write16, bufferConcat, toHex, fromHex, error, read32, read16, NumberFormat, getNumber, write32 } from "./utils";
import {
JD_FRAME_FLAG_COMMAND,
JD_FRAME_FLAG_IDENTIFIER_IS_SERVICE_CLASS,
@ -8,11 +8,11 @@ import {
JD_SERVICE_NUMBER_MASK,
JD_SERVICE_NUMBER_INV_MASK,
JD_SERIAL_MAX_PAYLOAD_SIZE,
} from "./jdconstants";
} from "./constants";
import {
sendPacket
} from "./jdbus";
import { Device } from "./jddevice";
} from "./bus";
import { Device } from "./device";
export class Packet {
_header: Uint8Array;

Просмотреть файл

@ -1,6 +1,6 @@
import * as U from "./jdutils"
import * as jd from "./jdconstants"
import { Packet } from "./jdpacket"
import * as U from "./utils"
import * as jd from "./constants"
import { Packet } from "./packet"
const service_classes: U.SMap<number> = {
"<disabled>": -1,

Просмотреть файл

Просмотреть файл

@ -1,7 +1,7 @@
import { setBus } from "../src/jd"
import { printPacket } from "../src/jdpretty"
import { Packet } from "../src/jdpacket";
import { getDevices } from "../src/jddevice";
import { setBus } from "../src/bus"
import { printPacket } from "../src/pretty"
import { Packet } from "../src/packet";
import { getDevices } from "../src/device";
class TestBus {
send(p: Packet): Promise<void> {