{"version":3,"file":"FuncCard_SetDelayTime_1.mjs","names":[],"sources":["../../generated/api/FuncCard_SetDelayTime_1.ts"],"sourcesContent":["import { encodeUIntLE, ErrorType, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    FuncCard_SetDelayTime_1(\n      addr: number,\n      portAddr: number,\n      funcCardAddr: number,\n      bBroadcast: boolean,\n      delayTime: number\n    ): Promise<void>;\n    tryFuncCard_SetDelayTime_1(\n      addr: number,\n      portAddr: number,\n      funcCardAddr: number,\n      delayTime: number\n    ): Promise<ErrorType | null>;\n  }\n}\nexport default function createFuncCard_SetDelayTime_1<Broadcast extends boolean>(\n  addr: number,\n  portAddr: number,\n  funcCardAddr: number,\n  bBroadcast: Broadcast,\n  delayTime: number\n): Request<Broadcast> {\n  const $data = encodeUIntLE(delayTime, AddressMapping.FuncCard_DelayTimeOccupancy);\n  const req = new Request($data, bBroadcast, 'FuncCard_SetDelayTime_1');\n  req.destination = addr;\n  req.deviceType = 2;\n  req.port = portAddr;\n  req.rcvIndex = funcCardAddr;\n  req.address = AddressMapping.FuncCard_DelayTimeAddr;\n  return req;\n}\nSession.prototype.FuncCard_SetDelayTime_1 = async function FuncCard_SetDelayTime_1(\n  this: Session,\n  addr: number,\n  portAddr: number,\n  funcCardAddr: number,\n  bBroadcast: boolean,\n  delayTime: number\n): Promise<void> {\n  const req = createFuncCard_SetDelayTime_1(addr, portAddr, funcCardAddr, bBroadcast, delayTime);\n  await this.connection.send(req);\n};\nSession.prototype.tryFuncCard_SetDelayTime_1 = async function tryFuncCard_SetDelayTime_1(\n  this: Session,\n  addr: number,\n  portAddr: number,\n  funcCardAddr: number,\n  delayTime: number\n): Promise<ErrorType | null> {\n  const req = createFuncCard_SetDelayTime_1(addr, portAddr, funcCardAddr, false, delayTime);\n  return (await this.connection.trySend(req))?.ack ?? null;\n};\n"],"mappings":";;;;AAoBA,SAAwB,8BACtB,MACA,UACA,cACA,YACA,WACoB;CAEpB,MAAM,MAAM,IAAI,QADF,aAAa,YACC,GAAG,YAAY,yBAAyB;CACpE,IAAI,cAAc;CAClB,IAAI,aAAa;CACjB,IAAI,OAAO;CACX,IAAI,WAAW;CACf,IAAI;CACJ,OAAO;AACT;AACA,QAAQ,UAAU,0BAA0B,eAAe,wBAEzD,MACA,UACA,cACA,YACA,WACe;CACf,MAAM,MAAM,8BAA8B,MAAM,UAAU,cAAc,YAAY,SAAS;CAC7F,MAAM,KAAK,WAAW,KAAK,GAAG;AAChC;AACA,QAAQ,UAAU,6BAA6B,eAAe,2BAE5D,MACA,UACA,cACA,WAC2B;CAC3B,MAAM,MAAM,8BAA8B,MAAM,UAAU,cAAc,OAAO,SAAS;CACxF,QAAQ,MAAM,KAAK,WAAW,QAAQ,GAAG,IAAI,OAAO;AACtD"}