{"version":3,"file":"ReadCabinetRotation.cjs","names":["Request"],"sources":["../../generated/api/ReadCabinetRotation.ts"],"sourcesContent":["import { decodeUIntLE, Packet, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    ReadCabinetRotation(addr: number): Promise<number>;\n    tryReadCabinetRotation(addr: number): Promise<Packet | null>;\n  }\n}\nexport default function createReadCabinetRotation(addr: number): Request {\n  const req = new Request(AddressMapping.CabinetRotationOccupancy, 'ReadCabinetRotation');\n  req.destination = addr;\n  req.address = AddressMapping.CabinetRotationAddr;\n  return req;\n}\nSession.prototype.ReadCabinetRotation = async function ReadCabinetRotation(\n  this: Session,\n  addr: number\n): Promise<number> {\n  const req = createReadCabinetRotation(addr);\n  return decodeUIntLE(await this.connection.send(req));\n};\nSession.prototype.tryReadCabinetRotation = async function tryReadCabinetRotation(\n  this: Session,\n  addr: number\n): Promise<Packet | null> {\n  const req = createReadCabinetRotation(addr);\n  return this.connection.trySend(req);\n};\n"],"mappings":";;;;;AASA,SAAwB,0BAA0B,MAAuB;CACvE,MAAM,MAAM,IAAIA,2BAAiD,qBAAqB;CACtF,IAAI,cAAc;CAClB,IAAI;CACJ,OAAO;AACT;AACA,wBAAQ,UAAU,sBAAsB,eAAe,oBAErD,MACiB;CACjB,MAAM,MAAM,0BAA0B,IAAI;CAC1C,yCAAoB,MAAM,KAAK,WAAW,KAAK,GAAG,CAAC;AACrD;AACA,wBAAQ,UAAU,yBAAyB,eAAe,uBAExD,MACwB;CACxB,MAAM,MAAM,0BAA0B,IAAI;CAC1C,OAAO,KAAK,WAAW,QAAQ,GAAG;AACpC"}