public class LightId extends Object
8bit for Crc8Long encode 55 bit = block(10bit=1023) + sequence(45bit=35184372088831)
for 1023 block unstopped 50000 id/second, running
(2^45 -1)/(365*24*3600*50000) = 22.3 years
Crc8Long| Modifier and Type | Field and Description |
|---|---|
static int |
BIT_BLOCK |
static int |
BIT_LIGHT |
static int |
BIT_SEQUENCE |
static int |
MAX_BLOCK |
static long |
MAX_SEQUENCE |
static int |
MIN_BLOCK |
static long |
MIN_SEQUENCE |
static LightId |
NONE |
static LightId |
ZERO |
| Constructor and Description |
|---|
LightId(int block,
long sequence) |
| Modifier and Type | Method and Description |
|---|---|
int |
component1() |
long |
component2() |
boolean |
equals(Object o) |
int |
getBlock() |
long |
getSequence() |
int |
hashCode() |
long |
toLong() |
@NotNull String |
toString() |
public static final LightId NONE
public static final LightId ZERO
public static final int BIT_LIGHT
public static final int BIT_BLOCK
public static final int MIN_BLOCK
public static final int MAX_BLOCK
public static final int BIT_SEQUENCE
public static final long MIN_SEQUENCE
public static final long MAX_SEQUENCE
Copyright © 2020. All rights reserved.