Skip to content

Commit

Permalink
Add more type definitions and constants to OpenInterfaces.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kabanov committed Nov 14, 2024
1 parent 64a284d commit 35e63f7
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion oif/lang_julia/OpenInterfaces/src/OpenInterfaces.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
module OpenInterfaces
# Define constants and data structures equivalent to the C interface.
# See oif/api.h

export OIFArrayF64
export OIFArgType, OIFArgs, OIFArrayF64
export OIF_INT, OIF_FLOAT64, OIF_ARRAY_F64, OIF_STR, OIF_CALLBACK, OIF_USER_DATA, OIF_CONFIG_DICT

@enum OIFArgType begin
OIF_INT = 1
# OIF_FLOAT32 = 2
OIF_FLOAT64 = 3
# OIF_FLOAT32_P = 4
OIF_ARRAY_F64 = 5
OIF_STR = 6
OIF_CALLBACK = 7
OIF_USER_DATA = 8
OIF_CONFIG_DICT = 9
end

struct OIFArrayF64
nd::Int32
dimensions::Ptr{Int64}
data::Ptr{Float64}
end

struct OIFArgs
num_args::Int64
arg_types::Ptr{OIFArgType}
arg_values::Ptr{Ptr{Cvoid}}
end

end # module OpenInterfaces

0 comments on commit 35e63f7

Please sign in to comment.