2024-04-21 00:21:57 +00:00
|
|
|
// <auto-generated>
|
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
// </auto-generated>
|
|
|
|
|
|
|
|
namespace SCHALE.Common.FlatData
|
|
|
|
{
|
|
|
|
|
|
|
|
using global::System;
|
|
|
|
using global::System.Collections.Generic;
|
2024-04-29 15:52:45 +00:00
|
|
|
using global::SCHALE.Common.Crypto;
|
2024-04-21 00:21:57 +00:00
|
|
|
using global::Google.FlatBuffers;
|
|
|
|
|
|
|
|
public struct VoiceCommonExcel : IFlatbufferObject
|
|
|
|
{
|
|
|
|
private Table __p;
|
|
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
|
|
public static VoiceCommonExcel GetRootAsVoiceCommonExcel(ByteBuffer _bb) { return GetRootAsVoiceCommonExcel(_bb, new VoiceCommonExcel()); }
|
|
|
|
public static VoiceCommonExcel GetRootAsVoiceCommonExcel(ByteBuffer _bb, VoiceCommonExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
|
|
public VoiceCommonExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
|
2024-11-08 10:52:05 +00:00
|
|
|
public SCHALE.Common.FlatData.VoiceEvent VoiceEvent_ { get { int o = __p.__offset(4); return o != 0 ? (SCHALE.Common.FlatData.VoiceEvent)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.VoiceEvent.OnTSA; } }
|
2024-04-21 00:21:57 +00:00
|
|
|
public long Rate { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
|
|
public uint VoiceHash(int j) { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
|
|
|
|
public int VoiceHashLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
|
|
#if ENABLE_SPAN_T
|
|
|
|
public Span<uint> GetVoiceHashBytes() { return __p.__vector_as_span<uint>(8, 4); }
|
|
|
|
#else
|
|
|
|
public ArraySegment<byte>? GetVoiceHashBytes() { return __p.__vector_as_arraysegment(8); }
|
|
|
|
#endif
|
|
|
|
public uint[] GetVoiceHashArray() { return __p.__vector_as_array<uint>(8); }
|
|
|
|
|
|
|
|
public static Offset<SCHALE.Common.FlatData.VoiceCommonExcel> CreateVoiceCommonExcel(FlatBufferBuilder builder,
|
2024-11-08 10:52:05 +00:00
|
|
|
SCHALE.Common.FlatData.VoiceEvent VoiceEvent_ = SCHALE.Common.FlatData.VoiceEvent.OnTSA,
|
2024-04-21 00:21:57 +00:00
|
|
|
long Rate = 0,
|
|
|
|
VectorOffset VoiceHashOffset = default(VectorOffset)) {
|
|
|
|
builder.StartTable(3);
|
|
|
|
VoiceCommonExcel.AddRate(builder, Rate);
|
|
|
|
VoiceCommonExcel.AddVoiceHash(builder, VoiceHashOffset);
|
2024-11-08 10:52:05 +00:00
|
|
|
VoiceCommonExcel.AddVoiceEvent_(builder, VoiceEvent_);
|
2024-04-21 00:21:57 +00:00
|
|
|
return VoiceCommonExcel.EndVoiceCommonExcel(builder);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void StartVoiceCommonExcel(FlatBufferBuilder builder) { builder.StartTable(3); }
|
2024-11-08 10:52:05 +00:00
|
|
|
public static void AddVoiceEvent_(FlatBufferBuilder builder, SCHALE.Common.FlatData.VoiceEvent voiceEvent_) { builder.AddInt(0, (int)voiceEvent_, 0); }
|
2024-04-21 00:21:57 +00:00
|
|
|
public static void AddRate(FlatBufferBuilder builder, long rate) { builder.AddLong(1, rate, 0); }
|
|
|
|
public static void AddVoiceHash(FlatBufferBuilder builder, VectorOffset voiceHashOffset) { builder.AddOffset(2, voiceHashOffset.Value, 0); }
|
|
|
|
public static VectorOffset CreateVoiceHashVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); }
|
|
|
|
public static VectorOffset CreateVoiceHashVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
|
|
|
|
public static VectorOffset CreateVoiceHashVectorBlock(FlatBufferBuilder builder, ArraySegment<uint> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
|
|
|
|
public static VectorOffset CreateVoiceHashVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<uint>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
|
|
public static void StartVoiceHashVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.VoiceCommonExcel> EndVoiceCommonExcel(FlatBufferBuilder builder) {
|
|
|
|
int o = builder.EndTable();
|
|
|
|
return new Offset<SCHALE.Common.FlatData.VoiceCommonExcel>(o);
|
|
|
|
}
|
2024-04-29 15:52:45 +00:00
|
|
|
public VoiceCommonExcelT UnPack() {
|
|
|
|
var _o = new VoiceCommonExcelT();
|
|
|
|
this.UnPackTo(_o);
|
|
|
|
return _o;
|
|
|
|
}
|
|
|
|
public void UnPackTo(VoiceCommonExcelT _o) {
|
|
|
|
byte[] key = TableEncryptionService.CreateKey("VoiceCommon");
|
2024-11-08 10:52:05 +00:00
|
|
|
_o.VoiceEvent_ = TableEncryptionService.Convert(this.VoiceEvent_, key);
|
2024-04-29 15:52:45 +00:00
|
|
|
_o.Rate = TableEncryptionService.Convert(this.Rate, key);
|
|
|
|
_o.VoiceHash = new List<uint>();
|
|
|
|
for (var _j = 0; _j < this.VoiceHashLength; ++_j) {_o.VoiceHash.Add(TableEncryptionService.Convert(this.VoiceHash(_j), key));}
|
|
|
|
}
|
|
|
|
public static Offset<SCHALE.Common.FlatData.VoiceCommonExcel> Pack(FlatBufferBuilder builder, VoiceCommonExcelT _o) {
|
|
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.VoiceCommonExcel>);
|
|
|
|
var _VoiceHash = default(VectorOffset);
|
|
|
|
if (_o.VoiceHash != null) {
|
|
|
|
var __VoiceHash = _o.VoiceHash.ToArray();
|
|
|
|
_VoiceHash = CreateVoiceHashVector(builder, __VoiceHash);
|
|
|
|
}
|
|
|
|
return CreateVoiceCommonExcel(
|
|
|
|
builder,
|
2024-11-08 10:52:05 +00:00
|
|
|
_o.VoiceEvent_,
|
2024-04-29 15:52:45 +00:00
|
|
|
_o.Rate,
|
|
|
|
_VoiceHash);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public class VoiceCommonExcelT
|
|
|
|
{
|
2024-11-08 10:52:05 +00:00
|
|
|
public SCHALE.Common.FlatData.VoiceEvent VoiceEvent_ { get; set; }
|
2024-04-29 15:52:45 +00:00
|
|
|
public long Rate { get; set; }
|
|
|
|
public List<uint> VoiceHash { get; set; }
|
|
|
|
|
|
|
|
public VoiceCommonExcelT() {
|
2024-11-08 10:52:05 +00:00
|
|
|
this.VoiceEvent_ = SCHALE.Common.FlatData.VoiceEvent.OnTSA;
|
2024-04-29 15:52:45 +00:00
|
|
|
this.Rate = 0;
|
|
|
|
this.VoiceHash = null;
|
|
|
|
}
|
2024-04-21 00:21:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static public class VoiceCommonExcelVerify
|
|
|
|
{
|
|
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
|
|
{
|
|
|
|
return verifier.VerifyTableStart(tablePos)
|
2024-11-08 10:52:05 +00:00
|
|
|
&& verifier.VerifyField(tablePos, 4 /*VoiceEvent_*/, 4 /*SCHALE.Common.FlatData.VoiceEvent*/, 4, false)
|
2024-04-21 00:21:57 +00:00
|
|
|
&& verifier.VerifyField(tablePos, 6 /*Rate*/, 8 /*long*/, 8, false)
|
|
|
|
&& verifier.VerifyVectorOfData(tablePos, 8 /*VoiceHash*/, 4 /*uint*/, false)
|
|
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|