Module ReaderInc.Make

Contents

Instructions: Use this module in your project

In the IDE (CLion, Visual Studio Code, Xcode, etc.) you use for your DkSDK project:

  1. Add the following to your project's dependencies/CMakeLists.txt:

    Copy
    DkSDKProject_DeclareAvailable(capnp
        CONSTRAINT "= 3.5.0"
        FINDLIBS capnp capnp.unix)
    DkSDKProject_MakeAvailable(capnp)
  2. Add the Findlib::capnp library to any desired targets in src/*/CMakeLists.txt:

    Copy
    target_link_libraries(YourPackage_YourLibraryName
         # ... existing libraries, if any ...
         Findlib::capnp)
  3. Click your IDE's Build button

Not using DkSDK?

FIRST, do one or all of the following:

  1. Run:

    Copy
    opam install capnp.3.5.0
  2. Edit your dune-project and add:

    Copy
    (package
      (name YourExistingPackage)
      (depends
      ; ... existing dependenices ...
      (capnp (>= 3.5.0))))

    Then run:

    Copy
    dune build *.opam # if this fails, run: dune build
  3. Edit your <package>.opam file and add:

    Copy
    depends: [
      # ... existing dependencies ...
      "capnp" {>= "3.5.0"}
    ]

    Then run:

    Copy
    opam install . --deps-only

FINALLY, add the capnp library to any desired (library)and/or (executable) targets in your **/dune files:

Copy
(library
  (name YourLibrary)
  ; ... existing library options ...
  (libraries
    ; ... existing libraries ...
    capnp))

(executable
  (name YourExecutable)
  ; ... existing executable options ...
  (libraries
    ; ... existing libraries ...
    capnp))

Parameters

Signature

module RC:sig...end

include module type of struct include RC end

moduleSegment`` =RC.Segment
moduleMessage`` =RC.Message
moduleSlice`` =RC.Slice
moduleStructStorage`` =RC.StructStorage
moduleListStorage`` =RC.ListStorage
moduleObject`` =RC.Object
valbounds_check_slice_exn : ``?err:string-> 'cap Slice.t -> unit
val ss_get_pointer : ``('cap, 'a)`` StructStorage.t ->``int-> 'cap Slice.t option
valdecode_pointer64 : ``int64-> Capnp__.Pointer.t
valdecode_pointer :'cap Slice.t -> Capnp__.Pointer.t
val make_list_storage_aux : ``message:'a Message.t ->``num_words:int->``num_elements:int-> ``storage_type:Capnp__.ListStorageType.t ->``segment_id:int->``segment_offset:int-> 'a ListStorage.t
val make_list_storage : ``message:'cap Message.t ->``segment_id:int->``segment_offset:int-> ``list_pointer:Capnp__.ListPointer.t -> 'cap ListStorage.t
valderef_far_pointer :Capnp__.FarPointer.t -> 'cap Message.t -> ``('cap, 'a)`` Object.t
valderef_pointer :'cap Slice.t -> ``('cap, 'a)`` Object.t
moduleListDecoders`` =RC.ListDecoders
moduleListCodecs`` =RC.ListCodecs
val_dummy : ``boolref
valmake_array_readonly :'cap ListStorage.t -> ``('cap, 'a)`` ListDecoders.t -> ``(Message.ro, 'a, 'cap ListStorage.t)`` Capnp__.InnerArray.t
val make_array_readwrite : ``list_storage:Message.rw ListStorage.t ->``init:``(``int-> Message.rw ListStorage.t)`` -> ``codecs:'a ListCodecs.t -> ``(Message.rw, 'a, Message.rw ListStorage.t)`` Capnp__.InnerArray.t
valstring_of_uint8_list : ``null_terminated:bool-> 'cap ListStorage.t -> string
valstruct_of_bytes_slice :'a Slice.t -> ``('a, 'b)`` StructStorage.t
valstruct_of_pointer_slice :'a Slice.t -> ``('a, 'b)`` StructStorage.t
valmake_struct_of_list_index :'a ListStorage.t ->``int-> ``('a, 'b)`` StructStorage.t
valderef_list_pointer :'cap Slice.t -> 'cap0 ListStorage.t option
valderef_struct_pointer :'cap Slice.t -> ``('cap0, 'a)`` StructStorage.t option
valderef_opt_struct_pointer :'a Slice.toption``-> ``('a, 'b)`` StructStorage.t option
val void_list_decoders : ``('a, unit)`` ListDecoders.t
val bit_list_decoders : ``('a, bool)`` ListDecoders.t
val int8_list_decoders : ``('a, int)`` ListDecoders.t
val int16_list_decoders : ``('a, int)`` ListDecoders.t
val int32_list_decoders : ``('a, Stdlib.Int32.t)`` ListDecoders.t
val int64_list_decoders : ``('a, Stdlib.Int64.t)`` ListDecoders.t
val uint8_list_decoders : ``('a, int)`` ListDecoders.t
val uint16_list_decoders : ``('a, int)`` ListDecoders.t
val uint32_list_decoders : ``('a, Stdint.Uint32.t)`` ListDecoders.t
val uint64_list_decoders : ``('a, Stdint.Uint64.t)`` ListDecoders.t
val float32_list_decoders : ``('a, float)`` ListDecoders.t
val float64_list_decoders : ``('a, float)`` ListDecoders.t
val text_list_decoders : ``('a, string)`` ListDecoders.t
val blob_list_decoders : ``('a, string)`` ListDecoders.t
val struct_list_decoders : ``('a, ``('b, 'c)`` StructStorage.toption``)``ListDecoders.t
valget_root_struct :'cap Message.t -> ``('cap0, 'a)`` StructStorage.t option
valget_bit : ``default:bool-> ``('cap, 'a)`` StructStorage.toption``->``byte_ofs:int->``bit_ofs:int-> bool
valget_int8 : ``default:int-> ``('cap, 'a)`` StructStorage.toption``->``int-> int
valget_int16 : ``default:int-> ``('cap, 'a)`` StructStorage.toption``->``int-> int
valget_int32 : ``default:int32-> ``('cap, 'a)`` StructStorage.toption``->``int-> int32
valget_int64 : ``default:int64-> ``('cap, 'a)`` StructStorage.toption``->``int-> int64
valget_uint8 : ``default:int-> ``('cap, 'a)`` StructStorage.toption``->``int-> int
valget_uint16 : ``default:int-> ``('cap, 'a)`` StructStorage.toption``->``int-> int
val get_uint32 : ``default:Uint32.t -> ``('cap, 'a)`` StructStorage.toption``->``int-> Uint32.t
val get_uint64 : ``default:Uint64.t -> ``('cap, 'a)`` StructStorage.toption``->``int-> Uint64.t
valget_float32 : ``default_bits:int32-> ``('cap, 'a)`` StructStorage.toption``->``int-> float
valget_float64 : ``default_bits:int64-> ``('cap, 'a)`` StructStorage.toption``->``int-> float
val has_field : ``('cap, 'a)`` StructStorage.toption``->``int-> bool
valget_text : ``default:string-> ``('cap, 'a)`` StructStorage.toption``->``int-> string
valget_blob : ``default:string-> ``('cap, 'a)`` StructStorage.toption``->``int-> string
val get_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` ListDecoders.t -> ``(Message.ro, 'b)`` StructStorage.toption``->``int-> ``(Message.ro, 'a0, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_void_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, unit, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_bit_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, bool, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_int8_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, int, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_int16_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, int, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_int32_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, int32, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_int64_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, int64, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_uint8_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, int, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_uint16_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, int, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_uint32_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, Uint32.t, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_uint64_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, Uint64.t, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_float32_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, float, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_float64_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, float, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_text_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, string, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_blob_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, string, Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_struct_list : ``?default:Message.ro ListStorage.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> ``(Message.ro, ``(Message.ro, 'b)`` StructStorage.toption``,Message.ro ListStorage.t)`` Capnp__.InnerArray.t
val get_struct : ``?default:``(Message.ro, 'a)`` StructStorage.t -> ``(Message.ro, 'b)`` StructStorage.toption``->``int-> ``(Message.ro, 'a0)`` StructStorage.t option
val get_pointer : ``?default:Message.ro Slice.t -> ``(Message.ro, 'a)`` StructStorage.toption``->``int-> Message.ro Slice.t option
val get_interface : ``('cap, 'a)`` StructStorage.toption``->``int-> 'b MessageWrapper.Capability.t option
valpointers_struct :'a Slice.t -> ``('b, 'c)`` StructStorage.t
val cast_struct : ``('a, 'b)`` StructStorage.toption``-> ``('a, 'c)`` StructStorage.t option

More from the DkSDK Book

    1. DkSDK
      1. Package capnp
        1. Module Capnp
          1. Module Capnp.Array
          1. Module Capnp.BytesStorage
          1. Module Capnp.Codecs
            1. Module Codecs.FramedStream
            1. Module Codecs.FramingError
          1. Module Capnp.Message
            1. Module Message.BytesMessage
            1. Module Message.Make
          1. Module Capnp.MessageSig
          1. Module Capnp.RPC
            1. Module RPC.MethodID
            1. Module RPC.None
              1. Module M.ListStorage
              1. Module M.Message
              1. Module M.Object
              1. Module M.Segment
              1. Module M.Slice
              1. Module M.StructStorage
              1. ...
            1. Module RPC.Registry
          1. Module Capnp.Runtime
            1. Module Runtime.BuilderInc
                1. Module NM.Capability
                1. Module NM.ListStorage
                1. Module NM.Message
                1. Module NM.Object
                1. Module NM.Segment
                1. Module NM.Service
                1. Module NM.Slice
                1. Module NM.StructRef
                1. Module NM.StructStorage
                1. Module NM.Untyped
            1. Module Runtime.BuilderOps
                1. Module ROM.ListStorage
                1. Module ROM.Message
                1. Module ROM.Object
                1. Module ROM.Segment
                1. Module ROM.Slice
                1. Module ROM.StructStorage
                1. Module RWM.Capability
                1. Module RWM.ListStorage
                1. Module RWM.Message
                1. Module RWM.Object
                1. Module RWM.Segment
                1. Module RWM.Service
                1. Module RWM.Slice
                1. Module RWM.StructRef
                1. Module RWM.StructStorage
                1. Module RWM.Untyped
            1. Module Runtime.FarPointer
            1. Module Runtime.FragmentBuffer
            1. Module Runtime.InnerArray
            1. Module Runtime.ListPointer
            1. Module Runtime.ListStorageType
            1. Module Runtime.OtherPointer
            1. Module Runtime.Packing
            1. Module Runtime.Pointer
            1. Module Runtime.ReaderInc
              1. ...
              1. Module ReaderInc.Make
                1. Module MessageWrapper.Capability
                1. Module MessageWrapper.ListStorage
                1. Module MessageWrapper.Message
                1. Module MessageWrapper.Object
                1. Module MessageWrapper.Segment
                1. Module MessageWrapper.Service
                1. Module MessageWrapper.Slice
                1. Module MessageWrapper.StructRef
                1. Module MessageWrapper.StructStorage
                1. Module MessageWrapper.Untyped
            1. Module Runtime.StructPointer
            1. Module Runtime.Util
        1. Module Capnp_unix
          1. Module Capnp_unix.IO
            1. Module IO.ReadContext
            1. Module IO.WriteContext
      1. Package cmdliner
        1. Module Cmdliner
          1. Module Cmdliner.Arg
          1. Module Cmdliner.Cmd
            1. Module Cmd.Env
            1. Module Cmd.Exit
          1. Module Cmdliner.Manpage
          1. Module Cmdliner.Term
        1. Module Cmdliner_arg
        1. Module Cmdliner_base
        1. Module Cmdliner_cline
        1. Module Cmdliner_cmd
        1. Module Cmdliner_docgen
        1. Module Cmdliner_eval
        1. Module Cmdliner_info
          1. Module Cmdliner_info.Arg
            1. Module Arg.Set
          1. Module Cmdliner_info.Cmd
          1. Module Cmdliner_info.Env
            1. Module Env.Set
          1. Module Cmdliner_info.Eval
          1. Module Cmdliner_info.Exit
        1. Module Cmdliner_manpage
        1. Module Cmdliner_msg
        1. Module Cmdliner_term
        1. Module Cmdliner_term_deprecated
        1. Module Cmdliner_trie
      1. Package fmt
        1. Module Fmt
          1. Module Fmt.Dump
        1. Module Fmt_cli
        1. Module Fmt_tty
      1. Package logs
        1. Module Logs
          1. ...
        1. Module Logs_cli
        1. Module Logs_fmt
        1. Module Logs_lwt
        1. Module Logs_threaded
      1. Package lwt
        1. Module Lwt
          1. Module Lwt.Infix
            1. Module Infix.Let_syntax
          1. Module Lwt.Let_syntax
            1. Module Let_syntax.Let_syntax
          1. Module Lwt.Syntax
        1. Module Lwt_bytes
        1. Module Lwt_condition
        1. Module Lwt_config
        1. Module Lwt_engine
          1. Module Lwt_engine.Ev_backend
          1. Module Lwt_engine.Versioned
        1. Module Lwt_features
        1. Module Lwt_fmt
        1. Module Lwt_gc
        1. Module Lwt_io
          1. Module Lwt_io.BE
          1. Module Lwt_io.LE
          1. Module Lwt_io.Versioned
        1. Module Lwt_list
        1. Module Lwt_main
          1. Module Lwt_main.Enter_iter_hooks
          1. Module Lwt_main.Exit_hooks
          1. Module Lwt_main.Leave_iter_hooks
        1. Module Lwt_mutex
        1. Module Lwt_mvar
        1. Module Lwt_pool
        1. Module Lwt_pqueue
          1. Module Lwt_pqueue.Make
        1. Module Lwt_preemptive
        1. Module Lwt_process
        1. Module Lwt_result
          1. Module Lwt_result.Infix
          1. Module Lwt_result.Let_syntax
            1. Module Let_syntax.Let_syntax
          1. Module Lwt_result.Syntax
        1. Module Lwt_seq
        1. Module Lwt_sequence
        1. Module Lwt_stream
        1. Module Lwt_switch
        1. Module Lwt_sys
        1. Module Lwt_throttle
          1. Module Lwt_throttle.Make
        1. Module Lwt_timeout
        1. Module Lwt_unix
          1. Module Lwt_unix.IO_vectors
          1. Module Lwt_unix.LargeFile
          1. Module Lwt_unix.Versioned
      1. Package mtime
        1. Module Mtime
          1. Module Mtime.Span
        1. Module Mtime_clock
      1. Package ocaml
        1. Module Bigarray
        1. Module Condition
        1. Module Dynlink
        1. Module Event
        1. Module Mutex
        1. Module Profiling
        1. Module Semaphore
          1. Module Semaphore.Binary
          1. Module Semaphore.Counting
        1. Module Stdlib
          1. Module Stdlib.Arg
          1. Module Stdlib.Array
          1. Module Stdlib.ArrayLabels
          1. Module Stdlib.Atomic
          1. Module Stdlib.Bigarray
            1. Module Bigarray.Array0
            1. Module Bigarray.Array1
            1. Module Bigarray.Array2
            1. Module Bigarray.Array3
            1. Module Bigarray.Genarray
          1. Module Stdlib.Bool
          1. Module Stdlib.Buffer
          1. Module Stdlib.Bytes
          1. Module Stdlib.BytesLabels
          1. Module Stdlib.Callback
          1. Module Stdlib.Char
          1. Module Stdlib.Complex
          1. Module Stdlib.Digest
          1. Module Stdlib.Either
          1. Module Stdlib.Ephemeron
            1. Module Ephemeron.GenHashTable
            1. Module Ephemeron.K1
            1. Module Ephemeron.K2
            1. Module Ephemeron.Kn
          1. Module Stdlib.Filename
          1. Module Stdlib.Float
            1. Module Float.Array
            1. Module Float.ArrayLabels
          1. Module Stdlib.Format
          1. Module Stdlib.Fun
          1. Module Stdlib.Gc
            1. Module Gc.Memprof
          1. Module Stdlib.Genlex
          1. Module Stdlib.Hashtbl
            1. Module Hashtbl.Make
            1. Module Hashtbl.MakeSeeded
          1. Module Stdlib.In_channel
          1. Module Stdlib.Int
          1. Module Stdlib.Int32
          1. Module Stdlib.Int64
          1. Module Stdlib.LargeFile
          1. Module Stdlib.Lazy
          1. Module Stdlib.Lexing
          1. Module Stdlib.List
          1. Module Stdlib.ListLabels
          1. Module Stdlib.Map
            1. Module Map.Make
          1. Module Stdlib.Marshal
          1. Module Stdlib.MoreLabels
            1. Module MoreLabels.Hashtbl
                1. Module type Hashtbl.HashedType
                1. Module type Hashtbl.S
                1. Module type Hashtbl.SeededHashedType
                1. Module type Hashtbl.SeededS
            1. Module MoreLabels.Map
                1. Module type Map.OrderedType
                1. Module type Map.S
            1. Module MoreLabels.Set
                1. Module type Set.OrderedType
                1. Module type Set.S
          1. Module Stdlib.Nativeint
          1. Module Stdlib.Obj
            1. Module Obj.Closure
            1. Module Obj.Ephemeron
            1. Module Obj.Extension_constructor
          1. Module Stdlib.Oo
          1. Module Stdlib.Option
          1. Module Stdlib.Out_channel
          1. Module Stdlib.Parsing
          1. Module Stdlib.Pervasives
          1. Module Stdlib.Printexc
            1. Module Printexc.Slot
          1. Module Stdlib.Printf
          1. Module Stdlib.Queue
          1. Module Stdlib.Random
            1. Module Random.State
          1. Module Stdlib.Result
          1. Module Stdlib.Scanf
            1. Module Scanf.Scanning
          1. Module Stdlib.Seq
          1. Module Stdlib.Set
            1. Module Set.Make
          1. Module Stdlib.Stack
          1. Module Stdlib.StdLabels
          1. Module Stdlib.Stream
          1. Module Stdlib.String
          1. Module Stdlib.StringLabels
          1. Module Stdlib.Sys
            1. Module Sys.Immediate64
                1. Module type Immediate64.Immediate
                1. Module type Immediate64.Non_immediate
          1. Module Stdlib.Uchar
          1. Module Stdlib.Unit
          1. Module Stdlib.Weak
            1. Module Weak.Make
        1. Module Str
        1. Module Thread
        1. Module ThreadUnix
        1. Module Topdirs
        1. Module Unix
          1. Module Unix.LargeFile
        1. Module UnixLabels
          1. Module UnixLabels.LargeFile
          1. Module EndianBigstring
            1. Module EndianBigstring.BigEndian
            1. Module EndianBigstring.BigEndian_unsafe
            1. Module EndianBigstring.LittleEndian
            1. Module EndianBigstring.LittleEndian_unsafe
            1. Module EndianBigstring.NativeEndian
            1. Module EndianBigstring.NativeEndian_unsafe
          1. Module EndianBytes
            1. Module EndianBytes.BigEndian
            1. Module EndianBytes.BigEndian_unsafe
            1. Module EndianBytes.LittleEndian
            1. Module EndianBytes.LittleEndian_unsafe
            1. Module EndianBytes.NativeEndian
            1. Module EndianBytes.NativeEndian_unsafe
          1. Module EndianString
            1. Module EndianString.BigEndian
            1. Module EndianString.BigEndian_unsafe
            1. Module EndianString.LittleEndian
            1. Module EndianString.LittleEndian_unsafe
            1. Module EndianString.NativeEndian
            1. Module EndianString.NativeEndian_unsafe
      1. Package
      1. Package result
        1. Module Result
      1. Package stdint
        1. Module Stdint
          1. Module Stdint.Int128
          1. Module Stdint.Int16
          1. Module Stdint.Int24
          1. Module Stdint.Int32
          1. Module Stdint.Int40
          1. Module Stdint.Int48
          1. Module Stdint.Int56
          1. Module Stdint.Int64
          1. Module Stdint.Int8
          1. Module Stdint.Uint128
          1. Module Stdint.Uint16
          1. Module Stdint.Uint24
          1. Module Stdint.Uint32
          1. Module Stdint.Uint40
          1. Module Stdint.Uint48
          1. Module Stdint.Uint56
          1. Module Stdint.Uint64
          1. Module Stdint.Uint8