Module BA_.BOps
Contents
Instructions: Use this module in your project
In the IDE (CLion, Visual Studio Code, Xcode, etc.) you use for your DkSDK project:
Add the following to your project's
dependencies/CMakeLists.txt
:DkSDKProject_DeclareAvailable(capnp CONSTRAINT "= 3.5.0" FINDLIBS capnp capnp.unix) DkSDKProject_MakeAvailable(capnp)
Add the
Findlib::capnp
library to any desired targets insrc/*/CMakeLists.txt
:target_link_libraries(YourPackage_YourLibraryName # ... existing libraries, if any ... Findlib::capnp)
Click your IDE's
Build
button
Not using DkSDK?
FIRST, do one or all of the following:
Run:
opam install capnp.3.5.0
Edit your
dune-project
and add:(package (name YourExistingPackage) (depends ; ... existing dependenices ... (capnp (>= 3.5.0))))
Then run:
dune build *.opam # if this fails, run: dune build
Edit your
<package>.opam
file and add:depends: [ # ... existing dependencies ... "capnp" {>= "3.5.0"} ]
Then run:
opam install . --deps-only
FINALLY, add the capnp
library to any desired (library)
and/or (executable)
targets in your **/dune
files:
(library
(name YourLibrary)
; ... existing library options ...
(libraries
; ... existing libraries ...
capnp))
(executable
(name YourExecutable)
; ... existing executable options ...
(libraries
; ... existing libraries ...
capnp))
module
ROM
:
sig
...
end
module
ROC
:
sig
...
end
module
RWC
:
sig
...
end
module
RReader
:
sig
...
end
val
get_struct_pointer : ``(
'cap
,
'a
)``
NM.StructStorage.t
->
``int
->
'cap
NM.Slice.t
val
alloc_struct_storage :
Message.rw
NM.Message.t
->
``data_words:int
->
``pointer_words:int
->
``(
Message.rw
,
'a
)``
NM.StructStorage.t
val
alloc_list_storage :
Message.rw
NM.Message.t
->
Capnp__.ListStorageType.t
->
``int
->
Message.rw
NM.ListStorage.t
val
init_far_pointer :
Message.rw
NM.Slice.t
->
``content:
'a
->
``content_slice:
Message.rw
NM.Slice.t
->
``init_normal_pointer:``(
Message.rw
NM.Slice.t
->
'a
->
unit)``
->
``init_far_pointer_tag:``(
Message.rw
NM.Slice.t
->
unit)``
->
unit
val
list_pointer_type_of_storage_type :
Capnp__.ListStorageType.t
->
Capnp__.ListPointer.element_type_t
val
init_normal_list_pointer :
Message.rw
NM.Slice.t
->
Message.rw
NM.ListStorage.t
->
unit
val
init_list_pointer :
Message.rw
NM.Slice.t
->
Message.rw
NM.ListStorage.t
->
unit
val
init_normal_struct_pointer :
Message.rw
NM.Slice.t
->
``(
'cap
,
'a
)``
NM.StructStorage.t
->
unit
val
init_struct_pointer :
Message.rw
NM.Slice.t
->
``(
Message.rw
,
'a
)``
NM.StructStorage.t
->
unit
val
shallow_copy_pointer : ``src:
Message.rw
NM.Slice.t
->
``dest:
Message.rw
NM.Slice.t
->
unit
val
shallow_copy_struct : ``src:``(
Message.rw
,
'a
)``
NM.StructStorage.t
->
``dest:``(
Message.rw
,
'b
)``
NM.StructStorage.t
->
unit
val
upgrade_struct_list :
Message.rw
NM.Slice.t
->
Message.rw
NM.ListStorage.t
->
``data_words:int
->
``pointer_words:int
->
Message.rw
NM.ListStorage.t
val
deref_list_pointer : ``?struct_sizes:
Capnp__BuilderOps.StructSizes.t
->
``create_default:``(
Message.rw
NM.Message.t
->
Message.rw
NM.ListStorage.t
)``
->
Message.rw
NM.Slice.t
->
Message.rw
NM.ListStorage.t
val
shallow_zero_out_struct : ``(
Message.rw
,
'a
)``
NM.StructStorage.t
->
unit
val
upgrade_struct :
Message.rw
NM.Slice.t
->
``(
Message.rw
,
'a
)``
NM.StructStorage.t
->
``data_words:int
->
``pointer_words:int
->
``(
Message.rw
,
'a
)``
NM.StructStorage.t
val
deref_struct_pointer : ``create_default: ``(
Message.rw
NM.Message.t
->
``(
Message.rw
,
'a
)``
NM.StructStorage.t
)``
->
``data_words:int
->
``pointer_words:int
->
Message.rw
NM.Slice.t
->
``(
Message.rw
,
'a
)``
NM.StructStorage.t
val
deep_copy_pointer : ``src:
'cap
ROM.Slice.t
->
``dest:
Message.rw
NM.Slice.t
->
unit
val
deep_copy_struct : ``src:``(
'cap
,
'a
)``
ROM.StructStorage.t
->
``dest_message:
Message.rw
NM.Message.t
->
``data_words:int
->
``pointer_words:int
->
``(
Message.rw
,
'b
)``
NM.StructStorage.t
val
deep_copy_struct_to_dest : ``src:``(
'cap
,
'a
)``
ROM.StructStorage.t
->
``dest:``(
Message.rw
,
'b
)``
RWC.StructStorage.t
->
unit
val
deep_copy_list : ``?struct_sizes:
Capnp__BuilderOps.StructSizes.t
->
``src:
'cap
ROM.ListStorage.t
->
``dest_message:
Message.rw
NM.Message.t
->
``unit
->
Message.rw
NM.ListStorage.t
val
deep_copy_struct_list : ``src:
'cap
ROM.ListStorage.t
->
``dest_message:
Message.rw
NM.Message.t
->
``data_words:int
->
``pointer_words:int
->
Message.rw
NM.ListStorage.t
val
deep_zero_pointer :
Message.rw
NM.Slice.t
->
unit
val
deep_zero_list :
Message.rw
NM.ListStorage.t
->
unit
val
deep_zero_struct : ``(
Message.rw
,
'a
)``
NM.StructStorage.t
->
unit