Skip to content

Commit 95ad4ad

Browse files
author
odeheurles
committed
[C#] Rename Val to Value and include SBE stubs for FIX used in perf tests
1 parent 90566bf commit 95ad4ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6623
-176
lines changed

examples/csharp/Otf/ExampleTokenListener.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void OnEnum(Token fieldToken, DirectBuffer buffer, int bufferIndex, IList
4141
for (int i = beginIndex + 1; i < endIndex; i++)
4242
{
4343
// TODO to check..
44-
if (encodedValue == tokens[i].Encoding.ConstVal.LongValue())
44+
if (encodedValue == tokens[i].Encoding.ConstValue.LongValue())
4545
{
4646
value = tokens[i].Name;
4747
break;
@@ -65,7 +65,7 @@ public virtual void OnBitSet(Token fieldToken, DirectBuffer buffer, int bufferIn
6565
{
6666
Console.Write(" {0}=", tokens[i].Name);
6767

68-
long bitPosition = tokens[i].Encoding.ConstVal.LongValue();
68+
long bitPosition = tokens[i].Encoding.ConstValue.LongValue();
6969
bool flag = (encodedValue & (long) Math.Pow(2, bitPosition)) != 0;
7070

7171
Console.Write(Convert.ToString(flag));
@@ -154,7 +154,7 @@ private static PrimitiveValue ConstOrNotPresentValue(Token token, int actingVers
154154
Encoding encoding = token.Encoding;
155155
if (encoding.Presence == Presence.Constant)
156156
{
157-
return encoding.ConstVal;
157+
return encoding.ConstValue;
158158
}
159159

160160
if (Presence.Optional == encoding.Presence)

examples/csharp/generated_stub/generated/Car.cs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ public static string SerialNumberMetaAttribute(MetaAttribute metaAttribute)
8181
return "";
8282
}
8383

84-
public const ulong SerialNumberNullVal = 0x8000000000000000UL;
84+
public const ulong SerialNumberNullValue = 0x8000000000000000UL;
8585

86-
public const ulong SerialNumberMinVal = 0x0UL;
86+
public const ulong SerialNumberMinValue = 0x0UL;
8787

88-
public const ulong SerialNumberMaxVal = 0x7fffffffffffffffUL;
88+
public const ulong SerialNumberMaxValue = 0x7fffffffffffffffUL;
8989

9090
public ulong SerialNumber
9191
{
@@ -114,11 +114,11 @@ public static string ModelYearMetaAttribute(MetaAttribute metaAttribute)
114114
return "";
115115
}
116116

117-
public const ushort ModelYearNullVal = (ushort)65535;
117+
public const ushort ModelYearNullValue = (ushort)65535;
118118

119-
public const ushort ModelYearMinVal = (ushort)0;
119+
public const ushort ModelYearMinValue = (ushort)0;
120120

121-
public const ushort ModelYearMaxVal = (ushort)65534;
121+
public const ushort ModelYearMaxValue = (ushort)65534;
122122

123123
public ushort ModelYear
124124
{
@@ -201,11 +201,11 @@ public static string SomeNumbersMetaAttribute(MetaAttribute metaAttribute)
201201
return "";
202202
}
203203

204-
public const int SomeNumbersNullVal = -2147483648;
204+
public const int SomeNumbersNullValue = -2147483648;
205205

206-
public const int SomeNumbersMinVal = -2147483647;
206+
public const int SomeNumbersMinValue = -2147483647;
207207

208-
public const int SomeNumbersMaxVal = 2147483647;
208+
public const int SomeNumbersMaxValue = 2147483647;
209209

210210
public const int SomeNumbersLength = 5;
211211

@@ -243,11 +243,11 @@ public static string VehicleCodeMetaAttribute(MetaAttribute metaAttribute)
243243
return "";
244244
}
245245

246-
public const byte VehicleCodeNullVal = (byte)0;
246+
public const byte VehicleCodeNullValue = (byte)0;
247247

248-
public const byte VehicleCodeMinVal = (byte)32;
248+
public const byte VehicleCodeMinValue = (byte)32;
249249

250-
public const byte VehicleCodeMaxVal = (byte)126;
250+
public const byte VehicleCodeMaxValue = (byte)126;
251251

252252
public const int VehicleCodeLength = 6;
253253

@@ -435,11 +435,11 @@ public static string SpeedMetaAttribute(MetaAttribute metaAttribute)
435435
return "";
436436
}
437437

438-
public const ushort SpeedNullVal = (ushort)65535;
438+
public const ushort SpeedNullValue = (ushort)65535;
439439

440-
public const ushort SpeedMinVal = (ushort)0;
440+
public const ushort SpeedMinValue = (ushort)0;
441441

442-
public const ushort SpeedMaxVal = (ushort)65534;
442+
public const ushort SpeedMaxValue = (ushort)65534;
443443

444444
public ushort Speed
445445
{
@@ -468,11 +468,11 @@ public static string MpgMetaAttribute(MetaAttribute metaAttribute)
468468
return "";
469469
}
470470

471-
public const float MpgNullVal = float.NaN;
471+
public const float MpgNullValue = float.NaN;
472472

473-
public const float MpgMinVal = 1.401298464324817E-45f;
473+
public const float MpgMinValue = 1.401298464324817E-45f;
474474

475-
public const float MpgMaxVal = 3.4028234663852886E38f;
475+
public const float MpgMaxValue = 3.4028234663852886E38f;
476476

477477
public float Mpg
478478
{
@@ -576,11 +576,11 @@ public static string OctaneRatingMetaAttribute(MetaAttribute metaAttribute)
576576
return "";
577577
}
578578

579-
public const byte OctaneRatingNullVal = (byte)255;
579+
public const byte OctaneRatingNullValue = (byte)255;
580580

581-
public const byte OctaneRatingMinVal = (byte)90;
581+
public const byte OctaneRatingMinValue = (byte)90;
582582

583-
public const byte OctaneRatingMaxVal = (byte)110;
583+
public const byte OctaneRatingMaxValue = (byte)110;
584584

585585
public byte OctaneRating
586586
{
@@ -683,11 +683,11 @@ public static string MphMetaAttribute(MetaAttribute metaAttribute)
683683
return "";
684684
}
685685

686-
public const ushort MphNullVal = (ushort)65535;
686+
public const ushort MphNullValue = (ushort)65535;
687687

688-
public const ushort MphMinVal = (ushort)0;
688+
public const ushort MphMinValue = (ushort)0;
689689

690-
public const ushort MphMaxVal = (ushort)65534;
690+
public const ushort MphMaxValue = (ushort)65534;
691691

692692
public ushort Mph
693693
{
@@ -716,11 +716,11 @@ public static string SecondsMetaAttribute(MetaAttribute metaAttribute)
716716
return "";
717717
}
718718

719-
public const float SecondsNullVal = float.NaN;
719+
public const float SecondsNullValue = float.NaN;
720720

721-
public const float SecondsMinVal = 1.401298464324817E-45f;
721+
public const float SecondsMinValue = 1.401298464324817E-45f;
722722

723-
public const float SecondsMaxVal = 3.4028234663852886E38f;
723+
public const float SecondsMaxValue = 3.4028234663852886E38f;
724724

725725
public float Seconds
726726
{

examples/csharp/generated_stub/generated/Engine.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public void Wrap(DirectBuffer buffer, int offset, int actingVersion)
2020

2121
public const int Size = 6;
2222

23-
public const ushort CapacityNullVal = (ushort)65535;
23+
public const ushort CapacityNullValue = (ushort)65535;
2424

25-
public const ushort CapacityMinVal = (ushort)0;
25+
public const ushort CapacityMinValue = (ushort)0;
2626

27-
public const ushort CapacityMaxVal = (ushort)65534;
27+
public const ushort CapacityMaxValue = (ushort)65534;
2828

2929
public ushort Capacity
3030
{
@@ -39,11 +39,11 @@ public ushort Capacity
3939
}
4040

4141

42-
public const byte NumCylindersNullVal = (byte)255;
42+
public const byte NumCylindersNullValue = (byte)255;
4343

44-
public const byte NumCylindersMinVal = (byte)0;
44+
public const byte NumCylindersMinValue = (byte)0;
4545

46-
public const byte NumCylindersMaxVal = (byte)254;
46+
public const byte NumCylindersMaxValue = (byte)254;
4747

4848
public byte NumCylinders
4949
{
@@ -58,19 +58,19 @@ public byte NumCylinders
5858
}
5959

6060

61-
public const ushort MaxRpmNullVal = (ushort)65535;
61+
public const ushort MaxRpmNullValue = (ushort)65535;
6262

63-
public const ushort MaxRpmMinVal = (ushort)0;
63+
public const ushort MaxRpmMinValue = (ushort)0;
6464

65-
public const ushort MaxRpmMaxVal = (ushort)65534;
65+
public const ushort MaxRpmMaxValue = (ushort)65534;
6666

6767
public ushort MaxRpm { get { return (ushort)9000; } }
6868

69-
public const byte ManufacturerCodeNullVal = (byte)0;
69+
public const byte ManufacturerCodeNullValue = (byte)0;
7070

71-
public const byte ManufacturerCodeMinVal = (byte)32;
71+
public const byte ManufacturerCodeMinValue = (byte)32;
7272

73-
public const byte ManufacturerCodeMaxVal = (byte)126;
73+
public const byte ManufacturerCodeMaxValue = (byte)126;
7474

7575
public const int ManufacturerCodeLength = 3;
7676

@@ -119,11 +119,11 @@ public void SetManufacturerCode(byte[] src, int srcOffset)
119119
_buffer.SetBytes(_offset + 3, src, srcOffset, length);
120120
}
121121

122-
public const byte FuelNullVal = (byte)0;
122+
public const byte FuelNullValue = (byte)0;
123123

124-
public const byte FuelMinVal = (byte)32;
124+
public const byte FuelMinValue = (byte)32;
125125

126-
public const byte FuelMaxVal = (byte)126;
126+
public const byte FuelMaxValue = (byte)126;
127127

128128
private static readonly byte[] _fuelValue = {80, 101, 116, 114, 111, 108};
129129

examples/csharp/generated_stub/generated/GroupSizeEncoding.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public void Wrap(DirectBuffer buffer, int offset, int actingVersion)
2020

2121
public const int Size = 3;
2222

23-
public const ushort BlockLengthNullVal = (ushort)65535;
23+
public const ushort BlockLengthNullValue = (ushort)65535;
2424

25-
public const ushort BlockLengthMinVal = (ushort)0;
25+
public const ushort BlockLengthMinValue = (ushort)0;
2626

27-
public const ushort BlockLengthMaxVal = (ushort)65534;
27+
public const ushort BlockLengthMaxValue = (ushort)65534;
2828

2929
public ushort BlockLength
3030
{
@@ -39,11 +39,11 @@ public ushort BlockLength
3939
}
4040

4141

42-
public const byte NumInGroupNullVal = (byte)255;
42+
public const byte NumInGroupNullValue = (byte)255;
4343

44-
public const byte NumInGroupMinVal = (byte)0;
44+
public const byte NumInGroupMinValue = (byte)0;
4545

46-
public const byte NumInGroupMaxVal = (byte)254;
46+
public const byte NumInGroupMaxValue = (byte)254;
4747

4848
public byte NumInGroup
4949
{

examples/csharp/generated_stub/generated/MessageHeader.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public void Wrap(DirectBuffer buffer, int offset, int actingVersion)
2020

2121
public const int Size = 6;
2222

23-
public const ushort BlockLengthNullVal = (ushort)65535;
23+
public const ushort BlockLengthNullValue = (ushort)65535;
2424

25-
public const ushort BlockLengthMinVal = (ushort)0;
25+
public const ushort BlockLengthMinValue = (ushort)0;
2626

27-
public const ushort BlockLengthMaxVal = (ushort)65534;
27+
public const ushort BlockLengthMaxValue = (ushort)65534;
2828

2929
public ushort BlockLength
3030
{
@@ -39,11 +39,11 @@ public ushort BlockLength
3939
}
4040

4141

42-
public const ushort TemplateIdNullVal = (ushort)65535;
42+
public const ushort TemplateIdNullValue = (ushort)65535;
4343

44-
public const ushort TemplateIdMinVal = (ushort)0;
44+
public const ushort TemplateIdMinValue = (ushort)0;
4545

46-
public const ushort TemplateIdMaxVal = (ushort)65534;
46+
public const ushort TemplateIdMaxValue = (ushort)65534;
4747

4848
public ushort TemplateId
4949
{
@@ -58,11 +58,11 @@ public ushort TemplateId
5858
}
5959

6060

61-
public const byte VersionNullVal = (byte)255;
61+
public const byte VersionNullValue = (byte)255;
6262

63-
public const byte VersionMinVal = (byte)0;
63+
public const byte VersionMinValue = (byte)0;
6464

65-
public const byte VersionMaxVal = (byte)254;
65+
public const byte VersionMaxValue = (byte)254;
6666

6767
public byte Version
6868
{
@@ -77,11 +77,11 @@ public byte Version
7777
}
7878

7979

80-
public const byte ReservedNullVal = (byte)255;
80+
public const byte ReservedNullValue = (byte)255;
8181

82-
public const byte ReservedMinVal = (byte)0;
82+
public const byte ReservedMinValue = (byte)0;
8383

84-
public const byte ReservedMaxVal = (byte)254;
84+
public const byte ReservedMaxValue = (byte)254;
8585

8686
public byte Reserved
8787
{

examples/csharp/generated_stub/generated/VarDataEncoding.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public void Wrap(DirectBuffer buffer, int offset, int actingVersion)
2020

2121
public const int Size = -1;
2222

23-
public const byte LengthNullVal = (byte)255;
23+
public const byte LengthNullValue = (byte)255;
2424

25-
public const byte LengthMinVal = (byte)0;
25+
public const byte LengthMinValue = (byte)0;
2626

27-
public const byte LengthMaxVal = (byte)254;
27+
public const byte LengthMaxValue = (byte)254;
2828

2929
public byte Length
3030
{
@@ -39,10 +39,10 @@ public byte Length
3939
}
4040

4141

42-
public const byte VarDataNullVal = (byte)255;
42+
public const byte VarDataNullValue = (byte)255;
4343

44-
public const byte VarDataMinVal = (byte)0;
44+
public const byte VarDataMinValue = (byte)0;
4545

46-
public const byte VarDataMaxVal = (byte)254;
46+
public const byte VarDataMaxValue = (byte)254;
4747
}
4848
}

0 commit comments

Comments
 (0)