// <auto-generated>
//  automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>

using global::System;
using global::System.Collections.Generic;
using global::Google.FlatBuffers;

public struct MotorState : IFlatbufferObject
{
  private Table __p;
  public ByteBuffer ByteBuffer { get { return __p.bb; } }
  public static void ValidateVersion() { }
  public static MotorState GetRootAsMotorState(ByteBuffer _bb) { return GetRootAsMotorState(_bb, new MotorState()); }
  public static MotorState GetRootAsMotorState(ByteBuffer _bb, MotorState obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
  public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
  public MotorState __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public int Angle { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }

  public static Offset<MotorState> CreateMotorState(FlatBufferBuilder builder,
      int angle = 0) {
    builder.StartTable(1);
    MotorState.AddAngle(builder, angle);
    return MotorState.EndMotorState(builder);
  }

  public static void StartMotorState(FlatBufferBuilder builder) { builder.StartTable(1); }
  public static void AddAngle(FlatBufferBuilder builder, int angle) { builder.AddInt(0, angle, 0); }
  public static Offset<MotorState> EndMotorState(FlatBufferBuilder builder) {
    int o = builder.EndTable();
    return new Offset<MotorState>(o);
  }
}


static public class MotorStateVerify
{
  static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
  {
    return verifier.VerifyTableStart(tablePos)
      && verifier.VerifyField(tablePos, 4 /*Angle*/, 4 /*int*/, 4, false)
      && verifier.VerifyTableEnd(tablePos);
  }
}
