public static SEAT_BILL decode(byte[] data) { SEAT_BILL proto = newBuilder(); proto.build(data); return(proto); }
public void addSeatBill(SEAT_BILL value) { if (!this.hasSeatBill()) { this.__flag[1] = (byte)(this.__flag[1] | 4); } this.seat_bill.Add(value); }
public void build(byte[] data) { ByteBuffer buf = ByteBuffer.wrap(data); for (int i = 0; i < this.__flag.Length; i++) { this.__flag[i] = buf.get(); } if (this.hasSeatBill()) { byte[] bytes = new byte[buf.getInt()]; buf.get(ref bytes, 0, bytes.Length); this.seat_bill = SEAT_BILL.decode(bytes); } }
public void build(byte[] data) { ByteBuffer buf = ByteBuffer.wrap(data); for (int i = 0; i < this.__flag.Length; i++) { this.__flag[i] = buf.get(); } if (this.hasRoomId()) { this.roomId = buf.getInt(); } if (this.hasMaxLoop()) { this.maxLoop = buf.getInt(); } if (this.hasLoop()) { this.loop = buf.getInt(); } if (this.hasScores()) { this.scores = buf.getInt(); } if (this.hasSeat()) { int size = buf.getShort(); for (int i = 0; i < size; i++) { byte[] bytes = new byte[buf.getInt()]; buf.get(ref bytes, 0, bytes.Length); this.seat.Add(SEAT.decode(bytes)); } } if (this.hasRoomstatus()) { this.roomstatus = (ENUM_ROOM_STATUS)buf.get(); } if (this.hasRound()) { this.round = buf.getInt(); } if (this.hasSettingId()) { int size = buf.getShort(); for (int i = 0; i < size; i++) { this.settingId.Add(buf.getInt()); } } if (this.hasBaseScore()) { this.baseScore = buf.getFloat(); } if (this.hasRoomPour()) { this.RoomPour = buf.getFloat(); } if (this.hasSeatBill()) { int size = buf.getShort(); for (int i = 0; i < size; i++) { byte[] bytes = new byte[buf.getInt()]; buf.get(ref bytes, 0, bytes.Length); this.seat_bill.Add(SEAT_BILL.decode(bytes)); } } if (this.hasTotalRound()) { this.totalRound = buf.getInt(); } if (this.hasPlayer()) { byte[] bytes = new byte[buf.getInt()]; buf.get(ref bytes, 0, bytes.Length); this.player = PLAYER.decode(bytes); } if (this.hasClubId()) { this.clubId = buf.getInt(); } }