예제 #1
0
        static Offset <FMotor> serialise_motor(FlatBufferBuilder b, IMotor motor, string identifier)
        {
            var n = b.CreateString(identifier);

            FMotor.StartFMotor(b);
            FMotor.AddMotorName(b, n);
            FMotor.AddValidInput(
                b,
                FRange.CreateFRange(
                    b,
                    motor.MotionValueSpace._Decimal_Granularity,
                    motor.MotionValueSpace._Max_Value,
                    motor.MotionValueSpace._Min_Value));
            FMotor.AddEnergySpentSinceReset(b, motor.GetEnergySpend());
            return(FMotor.EndFMotor(b));
        }
예제 #2
0
 public static FMotor GetRootAsFMotor(ByteBuffer _bb, FMotor obj)
 {
     return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }
예제 #3
0
 public FMotor?MotorsByKey(string key)
 {
     int o = this.__p.__offset(8); return(o != 0 ? FMotor.__lookup_by_key(this.__p.__vector(o), key, this.__p.bb) : null);
 }