forked from aeron-io/simple-binary-encoding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupSizeEncoding.cs
More file actions
61 lines (47 loc) · 1.28 KB
/
Copy pathGroupSizeEncoding.cs
File metadata and controls
61 lines (47 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Generated SBE (Simple Binary Encoding) message codec */
using System;
using Adaptive.SimpleBinaryEncoding;
namespace Baseline
{
public class GroupSizeEncoding : IFixedFlyweight
{
private DirectBuffer _buffer;
private int _offset;
private int _actingVersion;
public void Wrap(DirectBuffer buffer, int offset, int actingVersion)
{
_offset = offset;
_actingVersion = actingVersion;
_buffer = buffer;
}
public const int Size = 3;
public const ushort BlockLengthNullVal = (ushort)65535;
public const ushort BlockLengthMinVal = (ushort)0;
public const ushort BlockLengthMaxVal = (ushort)65534;
public ushort BlockLength
{
get
{
return _buffer.Uint16GetLittleEndian(_offset + 0);
}
set
{
_buffer.Uint16PutLittleEndian(_offset + 0, value);
}
}
public const byte NumInGroupNullVal = (byte)255;
public const byte NumInGroupMinVal = (byte)0;
public const byte NumInGroupMaxVal = (byte)254;
public byte NumInGroup
{
get
{
return _buffer.Uint8Get(_offset + 2);
}
set
{
_buffer.Uint8Put(_offset + 2, value);
}
}
}
}