
The Bit Message is a message that is hidden within the lines of an octet stream and it is represented as a hexadecimal string which has maximum length of 149 octets. The first 9 octets of the message contain the header for the message and the rest comprise the content. The header contains 1 type octet, 7 timestamp octets, and 1 message length octet. The content contains a maximum of 140 octets and could be packed with either 7 bit, 8 bit or 16 bit. 7 bit packed messages have a length of 160 characters, 8 bit packed messages have a length of 140 characters, and 16 bit packed messages will only have a length of 70 characters.
Here are some details on the structure of a bit message:
BIT MESSAGE FORMAT | ||||||||||
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
Octet-nth | ||||||||||
HEADER | TYPE | |||||||||
YEAR | ||||||||||
MONTH | ||||||||||
DAY | ||||||||||
HOUR | ||||||||||
MINUTE | ||||||||||
SECOND | ||||||||||
TIMEZONE | ||||||||||
LENGTH | ||||||||||
CONTENT | Octet-1 | |||||||||
... |
... |
|||||||||
Octet-140 | ||||||||||
7-BIT PACKED MESSAGE | ||||||||||
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
Octet-nth | ||||||||||
1 | 0 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | ||
8-BIT PACKED MESSAGE | ||||||||||
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
Octet-nth | ||||||||||
1 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | ||
16-BIT PACKED MESSAGE | ||||||||||
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
Octet-nth | ||||||||||
1 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | ||
2 | b15 | b14 | b13 | b12 | b11 | b10 | b9 | b8 | ||
HEADER | # OCTET | DESCRIPTION | |||||
TYPE | 1 | contains specific flag for specific format identifier | |||||
DETAIL | |||||||
Bit 0-1 : | reserved message class meaning | ||||||
Bit 2-3 : | message encoding | ||||||
Bit 3 | Bit 2 | Pack | |||||
0 | 0 | 7 bit | |||||
0 | 1 | 8 bit | |||||
1 | 0 | 16 bit | |||||
1 | 1 | reserved | |||||
Bit 4 : | reserved flag message class meaning | ||||||
Bit 5 : | reserved message is compressed or uncompressed | ||||||
Bit 6-7 : | reserved general data coding | ||||||
TIMESTAMP | 7 | contains specific swapped nibbles for specific format identifier | |||||
DETAIL | |||||||
Octet 1 | YEARe.g. 10 for 2001 | ||||||
Octet 2 | MONTHe.g. 10 for Jan | ||||||
Octet 3 | DAYe.g. 10 for 01 | ||||||
Octet 4 | HOURe.g. 10 for 01 | ||||||
Octet 5 | MINUTEe.g. 10 for 01 | ||||||
Octet 6 | SECONDe.g. 10 for 01 | ||||||
Octet 7 | TIMEZONEe.g. 80 for 08 x 15 / 60 = +2 | ||||||
The Time Zone is GMT format, expressed in quarters of an hour. In the first of the two semi-octets, the first bit represents the algebraic sign of this... | |||||||
LENGTH | 1 | maximum characters allowed is 160, 140 or 70 characters depends on message packed format | |||||