How to use the capnp-ts.ObjectSize function in capnp-ts

To help you get started, we’ve selected a few capnp-ts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jfrux / workbench / lib / capnp / car.capnp.js View on Github external
CarState.prototype.getDoorOpen = function () { return capnp_ts_1.Struct.getBit(72, this); };
  CarState.prototype.setDoorOpen = function (value) { capnp_ts_1.Struct.setBit(72, value, this); };
  CarState.prototype.getSeatbeltUnlatched = function () { return capnp_ts_1.Struct.getBit(73, this); };
  CarState.prototype.setSeatbeltUnlatched = function (value) { capnp_ts_1.Struct.setBit(73, value, this); };
  CarState.prototype.adoptCanMonoTimes = function (value) { capnp_ts_1.Struct.adopt(value, capnp_ts_1.Struct.getPointer(4, this)); };
  CarState.prototype.disownCanMonoTimes = function () { return capnp_ts_1.Struct.disown(this.getCanMonoTimes()); };
  CarState.prototype.getCanMonoTimes = function () { return capnp_ts_1.Struct.getList(4, capnp.Uint64List, this); };
  CarState.prototype.hasCanMonoTimes = function () { return !capnp_ts_1.Struct.isNull(capnp_ts_1.Struct.getPointer(4, this)); };
  CarState.prototype.initCanMonoTimes = function (length) { return capnp_ts_1.Struct.initList(4, capnp.Uint64List, length, this); };
  CarState.prototype.setCanMonoTimes = function (value) { capnp_ts_1.Struct.copyFrom(value, capnp_ts_1.Struct.getPointer(4, this)); };
  CarState.prototype.toString = function () { return 'CarState_' + _super.prototype.toString.call(this); };
  CarState.WheelSpeeds = CarState_WheelSpeeds;
  CarState.CruiseState = CarState_CruiseState;
  CarState.GearShifter = CarState_GearShifter;
  CarState.ButtonEvent = CarState_ButtonEvent;
  CarState._capnp = { displayName: 'CarState', id: '9da4fa09e052903c', size: new capnp_ts_1.ObjectSize(40, 6) };
  return CarState;
}(capnp_ts_1.Struct));
exports.CarState = CarState;
github jfrux / workbench / lib / capnp / car.capnp.js View on Github external
RadarState_RadarPoint.prototype.getTrackId = function () { return capnp_ts_1.Struct.getUint64(0, this); };
  RadarState_RadarPoint.prototype.setTrackId = function (value) { capnp_ts_1.Struct.setUint64(0, value, this); };
  RadarState_RadarPoint.prototype.getDRel = function () { return capnp_ts_1.Struct.getFloat32(8, this); };
  RadarState_RadarPoint.prototype.setDRel = function (value) { capnp_ts_1.Struct.setFloat32(8, value, this); };
  RadarState_RadarPoint.prototype.getYRel = function () { return capnp_ts_1.Struct.getFloat32(12, this); };
  RadarState_RadarPoint.prototype.setYRel = function (value) { capnp_ts_1.Struct.setFloat32(12, value, this); };
  RadarState_RadarPoint.prototype.getVRel = function () { return capnp_ts_1.Struct.getFloat32(16, this); };
  RadarState_RadarPoint.prototype.setVRel = function (value) { capnp_ts_1.Struct.setFloat32(16, value, this); };
  RadarState_RadarPoint.prototype.getARel = function () { return capnp_ts_1.Struct.getFloat32(20, this); };
  RadarState_RadarPoint.prototype.setARel = function (value) { capnp_ts_1.Struct.setFloat32(20, value, this); };
  RadarState_RadarPoint.prototype.getYvRel = function () { return capnp_ts_1.Struct.getFloat32(24, this); };
  RadarState_RadarPoint.prototype.setYvRel = function (value) { capnp_ts_1.Struct.setFloat32(24, value, this); };
  RadarState_RadarPoint.prototype.getMeasured = function () { return capnp_ts_1.Struct.getBit(224, this); };
  RadarState_RadarPoint.prototype.setMeasured = function (value) { capnp_ts_1.Struct.setBit(224, value, this); };
  RadarState_RadarPoint.prototype.toString = function () { return 'RadarState_RadarPoint_' + _super.prototype.toString.call(this); };
  RadarState_RadarPoint._capnp = { displayName: 'RadarPoint', id: '8ff333ebac1fdf36', size: new capnp_ts_1.ObjectSize(32, 0) };
  return RadarState_RadarPoint;
}(capnp_ts_1.Struct));
exports.RadarState_RadarPoint = RadarState_RadarPoint;
github jfrux / workbench / lib / capnp / car.capnp.js View on Github external
CarParams.prototype.setLongitudinalKiV = function (value) { capnp_ts_1.Struct.copyFrom(value, capnp_ts_1.Struct.getPointer(14, this)); };
  CarParams.prototype.getSteerLimitAlert = function () { return capnp_ts_1.Struct.getBit(7, this); };
  CarParams.prototype.setSteerLimitAlert = function (value) { capnp_ts_1.Struct.setBit(7, value, this); };
  CarParams.prototype.getVEgoStopping = function () { return capnp_ts_1.Struct.getFloat32(52, this); };
  CarParams.prototype.setVEgoStopping = function (value) { capnp_ts_1.Struct.setFloat32(52, value, this); };
  CarParams.prototype.getDirectAccelControl = function () { return capnp_ts_1.Struct.getBit(8, this); };
  CarParams.prototype.setDirectAccelControl = function (value) { capnp_ts_1.Struct.setBit(8, value, this); };
  CarParams.prototype.getStoppingControl = function () { return capnp_ts_1.Struct.getBit(9, this); };
  CarParams.prototype.setStoppingControl = function (value) { capnp_ts_1.Struct.setBit(9, value, this); };
  CarParams.prototype.getStartAccel = function () { return capnp_ts_1.Struct.getFloat32(56, this); };
  CarParams.prototype.setStartAccel = function (value) { capnp_ts_1.Struct.setFloat32(56, value, this); };
  CarParams.prototype.getSteerRateCost = function () { return capnp_ts_1.Struct.getFloat32(60, this); };
  CarParams.prototype.setSteerRateCost = function (value) { capnp_ts_1.Struct.setFloat32(60, value, this); };
  CarParams.prototype.toString = function () { return 'CarParams_' + _super.prototype.toString.call(this); };
  CarParams.SafetyModels = CarParams_SafetyModels;
  CarParams._capnp = { displayName: 'CarParams', id: '8c69372490aaa9da', size: new capnp_ts_1.ObjectSize(72, 19) };
  return CarParams;
}(capnp_ts_1.Struct));
exports.CarParams = CarParams;
github jfrux / workbench / lib / capnp / car.capnp.js View on Github external
CarEvent.prototype.setNoEntry = function (value) { capnp_ts_1.Struct.setBit(17, value, this); };
  CarEvent.prototype.getWarning = function () { return capnp_ts_1.Struct.getBit(18, this); };
  CarEvent.prototype.setWarning = function (value) { capnp_ts_1.Struct.setBit(18, value, this); };
  CarEvent.prototype.getUserDisable = function () { return capnp_ts_1.Struct.getBit(19, this); };
  CarEvent.prototype.setUserDisable = function (value) { capnp_ts_1.Struct.setBit(19, value, this); };
  CarEvent.prototype.getSoftDisable = function () { return capnp_ts_1.Struct.getBit(20, this); };
  CarEvent.prototype.setSoftDisable = function (value) { capnp_ts_1.Struct.setBit(20, value, this); };
  CarEvent.prototype.getImmediateDisable = function () { return capnp_ts_1.Struct.getBit(21, this); };
  CarEvent.prototype.setImmediateDisable = function (value) { capnp_ts_1.Struct.setBit(21, value, this); };
  CarEvent.prototype.getPreEnable = function () { return capnp_ts_1.Struct.getBit(22, this); };
  CarEvent.prototype.setPreEnable = function (value) { capnp_ts_1.Struct.setBit(22, value, this); };
  CarEvent.prototype.getPermanent = function () { return capnp_ts_1.Struct.getBit(23, this); };
  CarEvent.prototype.setPermanent = function (value) { capnp_ts_1.Struct.setBit(23, value, this); };
  CarEvent.prototype.toString = function () { return 'CarEvent_' + _super.prototype.toString.call(this); };
  CarEvent.EventName = CarEvent_EventName;
  CarEvent._capnp = { displayName: 'CarEvent', id: '9b1657f34caf3ad3', size: new capnp_ts_1.ObjectSize(8, 0) };
  return CarEvent;
}(capnp_ts_1.Struct));
exports.CarEvent = CarEvent;
github jfrux / workbench / lib / capnp / car.capnp.js View on Github external
var CarState_WheelSpeeds = /** @class */ (function (_super) {
  __extends(CarState_WheelSpeeds, _super);
  function CarState_WheelSpeeds () {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  CarState_WheelSpeeds.prototype.getFl = function () { return capnp_ts_1.Struct.getFloat32(0, this); };
  CarState_WheelSpeeds.prototype.setFl = function (value) { capnp_ts_1.Struct.setFloat32(0, value, this); };
  CarState_WheelSpeeds.prototype.getFr = function () { return capnp_ts_1.Struct.getFloat32(4, this); };
  CarState_WheelSpeeds.prototype.setFr = function (value) { capnp_ts_1.Struct.setFloat32(4, value, this); };
  CarState_WheelSpeeds.prototype.getRl = function () { return capnp_ts_1.Struct.getFloat32(8, this); };
  CarState_WheelSpeeds.prototype.setRl = function (value) { capnp_ts_1.Struct.setFloat32(8, value, this); };
  CarState_WheelSpeeds.prototype.getRr = function () { return capnp_ts_1.Struct.getFloat32(12, this); };
  CarState_WheelSpeeds.prototype.setRr = function (value) { capnp_ts_1.Struct.setFloat32(12, value, this); };
  CarState_WheelSpeeds.prototype.toString = function () { return 'CarState_WheelSpeeds_' + _super.prototype.toString.call(this); };
  CarState_WheelSpeeds._capnp = { displayName: 'WheelSpeeds', id: '991a37a6155935a3', size: new capnp_ts_1.ObjectSize(16, 0) };
  return CarState_WheelSpeeds;
}(capnp_ts_1.Struct));
exports.CarState_WheelSpeeds = CarState_WheelSpeeds;
github jfrux / workbench / lib / capnp / car.capnp.js View on Github external
RadarState.prototype.adoptPoints = function (value) { capnp_ts_1.Struct.adopt(value, capnp_ts_1.Struct.getPointer(1, this)); };
  RadarState.prototype.disownPoints = function () { return capnp_ts_1.Struct.disown(this.getPoints()); };
  RadarState.prototype.getPoints = function () { return capnp_ts_1.Struct.getList(1, RadarState._Points, this); };
  RadarState.prototype.hasPoints = function () { return !capnp_ts_1.Struct.isNull(capnp_ts_1.Struct.getPointer(1, this)); };
  RadarState.prototype.initPoints = function (length) { return capnp_ts_1.Struct.initList(1, RadarState._Points, length, this); };
  RadarState.prototype.setPoints = function (value) { capnp_ts_1.Struct.copyFrom(value, capnp_ts_1.Struct.getPointer(1, this)); };
  RadarState.prototype.adoptCanMonoTimes = function (value) { capnp_ts_1.Struct.adopt(value, capnp_ts_1.Struct.getPointer(2, this)); };
  RadarState.prototype.disownCanMonoTimes = function () { return capnp_ts_1.Struct.disown(this.getCanMonoTimes()); };
  RadarState.prototype.getCanMonoTimes = function () { return capnp_ts_1.Struct.getList(2, capnp.Uint64List, this); };
  RadarState.prototype.hasCanMonoTimes = function () { return !capnp_ts_1.Struct.isNull(capnp_ts_1.Struct.getPointer(2, this)); };
  RadarState.prototype.initCanMonoTimes = function (length) { return capnp_ts_1.Struct.initList(2, capnp.Uint64List, length, this); };
  RadarState.prototype.setCanMonoTimes = function (value) { capnp_ts_1.Struct.copyFrom(value, capnp_ts_1.Struct.getPointer(2, this)); };
  RadarState.prototype.toString = function () { return 'RadarState_' + _super.prototype.toString.call(this); };
  RadarState.Error = RadarState_Error;
  RadarState.RadarPoint = RadarState_RadarPoint;
  RadarState._capnp = { displayName: 'RadarState', id: '888ad6581cf0aacb', size: new capnp_ts_1.ObjectSize(0, 3) };
  return RadarState;
}(capnp_ts_1.Struct));
exports.RadarState = RadarState;
github jfrux / workbench / lib / capnp / car.capnp.js View on Github external
CarControl.prototype.disownCruiseControl = function () { return capnp_ts_1.Struct.disown(this.getCruiseControl()); };
  CarControl.prototype.getCruiseControl = function () { return capnp_ts_1.Struct.getStruct(0, CarControl_CruiseControl, this); };
  CarControl.prototype.hasCruiseControl = function () { return !capnp_ts_1.Struct.isNull(capnp_ts_1.Struct.getPointer(0, this)); };
  CarControl.prototype.initCruiseControl = function () { return capnp_ts_1.Struct.initStructAt(0, CarControl_CruiseControl, this); };
  CarControl.prototype.setCruiseControl = function (value) { capnp_ts_1.Struct.copyFrom(value, capnp_ts_1.Struct.getPointer(0, this)); };
  CarControl.prototype.adoptHudControl = function (value) { capnp_ts_1.Struct.adopt(value, capnp_ts_1.Struct.getPointer(1, this)); };
  CarControl.prototype.disownHudControl = function () { return capnp_ts_1.Struct.disown(this.getHudControl()); };
  CarControl.prototype.getHudControl = function () { return capnp_ts_1.Struct.getStruct(1, CarControl_HUDControl, this); };
  CarControl.prototype.hasHudControl = function () { return !capnp_ts_1.Struct.isNull(capnp_ts_1.Struct.getPointer(1, this)); };
  CarControl.prototype.initHudControl = function () { return capnp_ts_1.Struct.initStructAt(1, CarControl_HUDControl, this); };
  CarControl.prototype.setHudControl = function (value) { capnp_ts_1.Struct.copyFrom(value, capnp_ts_1.Struct.getPointer(1, this)); };
  CarControl.prototype.toString = function () { return 'CarControl_' + _super.prototype.toString.call(this); };
  CarControl.Actuators = CarControl_Actuators;
  CarControl.CruiseControl = CarControl_CruiseControl;
  CarControl.HUDControl = CarControl_HUDControl;
  CarControl._capnp = { displayName: 'CarControl', id: 'f78829049ab814af', size: new capnp_ts_1.ObjectSize(16, 3) };
  return CarControl;
}(capnp_ts_1.Struct));
exports.CarControl = CarControl;