Class: DeviceAtlas::Carrier::CarrierDataType

Inherits:
Object
  • Object
show all
Defined in:
lib/deviceatlas/carrier/carrier_data_type.rb

Constant Summary collapse

BOOLEAN =
0
BYTE =
1
SHORT =
2
INTEGER =
3
LONG =
4
FLOAT =
5
DOUBLE =
6
STRING =
7
UNKNOWN =
8
STRING_LEN_BYTE =

These are special types - used to optimise adding of String values Note - these are internal only, they should not be exposed to the customer

100
STRING_LEN_SHORT =

The string's bytes are <= Byte.MAX_LENGTH

101
STRING_LEN_INT =

The string's bytes are <= Short.MAX_LENGTH

102
STRING_1_BYTE_FIXED =

The string's bytes are <= Integer.MAX_LENGTH

103
STRING_2_BYTE_FIXED =
104
STRING_3_BYTE_FIXED =
105
STRING_4_BYTE_FIXED =
106
STRING_5_BYTE_FIXED =
107

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.name(data_type_id) ⇒ Object

Get the name of the given data type id

Instance Method Details

#base_data_type(data_type_id) ⇒ Object

Get the base data type for the given CarrierDataType. This essentially just converts the above special String types to the CarrierDataType.String type.