Plasma GitLab Archive
Projects Blog Knowledge

Module Netamqp_rtypes

module Netamqp_rtypes: sig .. end
Support for remote types not already covered by Netnumber


Integers



Short
type uint2 = int 
val read_uint2 : Bytes.t -> int -> uint2
val read_uint2_unsafe : Bytes.t -> int -> uint2
val read_string_uint2 : string -> int -> uint2
val read_string_uint2_unsafe : string -> int -> uint2
val write_uint2 : Bytes.t -> int -> uint2 -> unit
val write_uint2_unsafe : Bytes.t -> int -> uint2 -> unit
val uint2_as_string : uint2 -> string

Strings


val decode_shortstr : string -> int Pervasives.ref -> int -> string
val decode_longstr : string -> int Pervasives.ref -> int -> string
val encode_shortstr : string -> Bytes.t list * int
val encode_longstr : string -> Bytes.t list * int

Tables



Convention:
  • Sint<n>: signed integer with n bytes
  • Uint<n>: unsigned integer with n bytes
Note that there is confusion about what is allowed in tables, see http://dev.rabbitmq.com/wiki/Amqp091Errata. For best compatibility one should only use `Sint4, `Decimal, `Longstr, `Timestamp, `Table, and `Null.
type ('table_field, 'table) table_field_standard = [ `Decimal of int * Netnumber.uint4
| `Longstr of string
| `Null
| `Sint4 of Netnumber.int4
| `Table of 'table
| `Timestamp of float ]
type ('table_field, 'table) table_field_ok = [ `Bool of bool | `Double of float | `Float of float | `Sint1 of int ] 
type ('table_field, 'table) table_field_problematic = [ `Array of 'table_field list
| `Shortstr of string
| `Sint2 of int
| `Sint8 of Netnumber.int8
| `Uint1 of int
| `Uint2 of int
| `Uint4 of Netnumber.uint4
| `Uint8 of Netnumber.uint8 ]
type table_field = [ `Bool of bool
| `Decimal of int * Netnumber.uint4
| `Double of float
| `Float of float
| `Longstr of string
| `Null
| `Sint1 of int
| `Sint4 of Netnumber.int4
| `Table of table
| `Timestamp of float ]
type table = (string * table_field) list 
val decode_table : string -> int Pervasives.ref -> int -> table
val encode_table : table -> Bytes.t list * int

Misc


val unsafe_rev_concat : Bytes.t list -> int -> Bytes.t
val mk_mstring : Bytes.t -> Netxdr_mstring.mstring
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml