Changes between Version 1 and Version 2 of General/3aProtocol


Ignore:
Timestamp:
Feb 19, 2019, 12:05:15 AM (2 years ago)
Author:
seskar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • General/3aProtocol

    v1 v2  
    11= OML Measurement Stream Protocol (OMSP) =
     2
     3[[TOC(heading=General Documentation, General/*, depth=1)]]
    24
    35The OML Measurement Stream Protocol is used to describe and transport measurement tuples between Injection Points and Processing/Collection Points. All data injected in a Measurement Point (MP) (with omlc_inject) is timestamped and sent to the destination as a Measurement Stream (MS).
     
    104106||  0  ||  1  ||  2  ||  3  ||
    105107|| 0 1 2 3 4 5 6 7 || 8 9 0 1 2 3 4 5 || 6 7 8 9 0 1 2 3 || 4 5 6 7 8 9 0 1 ||
    106 --+---------------+---------------+---------------+---------------+
    107   |STRING_T|BLOB_T|       n       |   1st byte    |               |
    108 --+---------------+---------------+---------------+---------------+
    109   |               |              ...              |               |
    110   +---------------+---------------+---------------+---------------+
    111   |              ...              |   nth byte    |
    112   +---------------+---------------+---------------+--
     108||  STRING_T|BLOB_T  ||       n       ||   1st byte    ||               ||
     109||              ||    ...    ||               ||
     110||              ||     ...   ||   nth byte    ||
    113111Boolean values are only encoded as one byte, with a different type depending on there truth value (BOOL_FALSE_T or BOOL_TRUE_T). They were introduced with OMSPv4.
    114112
    115 --+---------------+--
    116   |  BOOL_xxx_T   |
    117 --+---------------+--
     113||  0  ||
     114|| 0 1 2 3 4 5 6 7 ||
     115||  BOOL_xxx_T   ||
     116
    118117Vectors (VECTOR_T) are represented by specifying the type of the vector elements and then the size of the vector (a sixteen bit unsigned integer in network byte order) and followed by the vector of values themselves. Vectors were introduced in OMSPv5.
    119118
    120119The vector elements are marshalled depending on the their type. For vectors of integers of INT32_T or (U)INT32_T the elements are packed in network-byte order as shown below:
    121120
    122 --+---------------+-----------------+---------------+---------------+
    123   |   VECTOR_T    |   (U)INT32_T    |      n-H      |      n-L      |
    124 --+---------------+-----------------+---------------+---------------+
    125   |int[0]-byte-HH |int[0]-byte-HL   |int[0]-byte-LH |int[0]-byte-LL |
    126   +---------------+-----------------+---------------+---------------+--
    127   |int[1]-byte-HH |int[1]-byte-HL   |int[1]-byte-LH |int[1]-byte-LL |
    128   +---------------+-----------------+---------------+---------------+--
     121||  0  ||  1  ||  2  ||  3  ||
     122|| 0 1 2 3 4 5 6 7 || 8 9 0 1 2 3 4 5 || 6 7 8 9 0 1 2 3 || 4 5 6 7 8 9 0 1 ||
     123||   VECTOR_T    ||   (U)INT32_T    ||      n-H      ||      n-L      ||
     124||  int[0]-byte-HH  ||  int[0]-byte-HL   ||  int[0]-byte-LH  ||  int[0]-byte-LL  ||
     125||  int[1]-byte-HH  ||  int[1]-byte-HL   ||  int[1]-byte-LH  ||  int[1]-byte-LL  ||
     126
    129127Similarly for the INT64_T and UINT64_T the elements are packed in network byte order (i.e., with the most significant octet first).
    130128
    131129For vectors of boolean values the vector elements are represented by a one-octet values which must be either BOOL_TRUE_T or BOOL_FALSE_T.
    132130
    133 --+---------------+-----------------+---------------+---------------+
    134   |   VECTOR_T    |     BOOL_T      |      n-H      |      n-L      |
    135 --+---------------+-----------------+---------------+---------------+
    136   |    bool[0]    |     bool[1]     |    bool[2]    |    bool[3]    |
    137   +---------------+-----------------+---------------+---------------+
    138   |    bool[4]    |
    139   +---------------+--
     131||  0  ||  1  ||  2  ||  3  ||
     132|| 0 1 2 3 4 5 6 7 || 8 9 0 1 2 3 4 5 || 6 7 8 9 0 1 2 3 || 4 5 6 7 8 9 0 1 ||
     133||   VECTOR_T    ||     BOOL_T      ||      n-H      ||      n-L      ||
     134||    bool[0]    ||     bool[1]     ||    bool[2]    ||    bool[3]    ||
     135||    bool[4]    ||  ||  ||  ||
     136
    140137For vectors of double an IEEE 754 binary64 value is transferred and we require that the byte ordering within that value is in network byte order (IEEE 754 does not specify byte ordering but the Wikipedia suggests that it is reasonable to assume that, for a given host, the endian-ness of doubles is the same as for integers).
    141138
    142 --+---------------+-----------------+---------------+---------------+
    143   |   VECTOR_T    |   DOUBLE64_T    |      n-H      |      n-L      |
    144 --+---------------+-----------------+---------------+---------------+
    145   |dbl[0]-MS-byte |  dbl[0]-byte-7  | dbl[0]-byte-6 | dbl[0]-byte-5 |
    146   +---------------+-----------------+---------------+---------------+--
    147   | dbl[0]-byte-4 |  dbl[0]-byte-3  | dbl[0]-byte-2 |dbl[0]-LS-byte |
    148   +---------------+-----------------+---------------+---------------+--
    149 See also
    150 marshal_init, marshal_header_short, marshal_header_long, marshal_measurements, marshal_values, marshal_finalize
     139||  0  ||  1  ||  2  ||  3  ||
     140|| 0 1 2 3 4 5 6 7 || 8 9 0 1 2 3 4 5 || 6 7 8 9 0 1 2 3 || 4 5 6 7 8 9 0 1 ||
     141||   VECTOR_T    ||   DOUBLE64_T    ||      n-H      ||      n-L      ||
     142||  dbl[0]-MS-byte ||  dbl[0]-byte-7  ||  dbl[0]-byte-6  ||  dbl[0]-byte-5   ||
     143||  dbl[0]-byte-4  ||  dbl[0]-byte-3  ||  dbl[0]-byte-2  ||  dbl[0]-LS-byte  ||
     144
     145See also marshal_init, marshal_header_short, marshal_header_long, marshal_measurements, marshal_values, marshal_finalize
    151146
    152147== OMSP Schema Specification ==