Reference

Contents

Index

Server

RemoteBMI.Server.run_bmi_server — Method
run(model, host, port)

Expose the specified model as web service.

Arguments

  • model: The model to be initialized and run.
  • host: The hostname or IP address.
  • port: The port number on to run the service.
source

Server generated code

RemoteBMI.Server.BmiServer — Module

Encapsulates generated server code for BmiServer

The following server methods must be implemented:

  • getcomponentname
    • invocation: GET /getcomponentname
    • signature: getcomponentname(req::HTTP.Request;) -> GetComponentNameResponse
  • getinputitem_count
    • invocation: GET /getinputitem_count
    • signature: getinputitem_count(req::HTTP.Request;) -> Int64
  • getinputvar_names
    • invocation: GET /getinputvar_names
    • signature: getinputvar_names(req::HTTP.Request;) -> Vector{String}
  • getoutputitem_count
    • invocation: GET /getoutputitem_count
    • signature: getoutputitem_count(req::HTTP.Request;) -> Int64
  • getoutputvar_names
    • invocation: GET /getoutputvar_names
    • signature: getoutputvar_names(req::HTTP.Request;) -> Vector{String}
  • get_value
    • invocation: GET /get_value/{name}
    • signature: get_value(req::HTTP.Request, name::String;) -> Vector{Float64}
  • getvalueat_indices
    • invocation: POST /getvalueat_indices/{name}
    • signature: getvalueatindices(req::HTTP.Request, name::String, requestbody::Vector{Int64};) -> Vector{Float64}
  • getgridrank
    • invocation: GET /getgridrank/{grid}
    • signature: getgridrank(req::HTTP.Request, grid::Int64;) -> Int64
  • getgridsize
    • invocation: GET /getgridsize/{grid}
    • signature: getgridsize(req::HTTP.Request, grid::Int64;) -> Int64
  • getgridtype
    • invocation: GET /getgridtype/{grid}
    • signature: getgridtype(req::HTTP.Request, grid::Int64;) -> GetGridTypeResponse
  • finalize
    • invocation: DELETE /finalize
    • signature: finalize(req::HTTP.Request;) -> Nothing
  • initialize
    • invocation: POST /initialize
    • signature: initialize(req::HTTP.Request, initialize_request::InitializeRequest;) -> Nothing
  • update
    • invocation: POST /update
    • signature: update(req::HTTP.Request;) -> Nothing
  • update_until
    • invocation: POST /update_until
    • signature: update_until(req::HTTP.Request, body::Float64;) -> Nothing
  • getgridx
    • invocation: GET /getgridx/{grid}
    • signature: getgridx(req::HTTP.Request, grid::Int64;) -> Vector{Float64}
  • getgridy
    • invocation: GET /getgridy/{grid}
    • signature: getgridy(req::HTTP.Request, grid::Int64;) -> Vector{Float64}
  • getgridz
    • invocation: GET /getgridz/{grid}
    • signature: getgridz(req::HTTP.Request, grid::Int64;) -> Vector{Float64}
  • set_value
    • invocation: POST /set_value/{name}
    • signature: setvalue(req::HTTP.Request, name::String, requestbody::Vector{Float64};) -> Nothing
  • setvalueat_indices
    • invocation: POST /setvalueat_indices/{name}
    • signature: setvalueatindices(req::HTTP.Request, name::String, setvalueatindices_request::SetValueAtIndicesRequest;) -> Nothing
  • getcurrenttime
    • invocation: GET /getcurrenttime
    • signature: getcurrenttime(req::HTTP.Request;) -> Float64
  • getendtime
    • invocation: GET /getendtime
    • signature: getendtime(req::HTTP.Request;) -> Float64
  • getstarttime
    • invocation: GET /getstarttime
    • signature: getstarttime(req::HTTP.Request;) -> Float64
  • gettimestep
    • invocation: GET /gettimestep
    • signature: gettimestep(req::HTTP.Request;) -> Float64
  • gettimeunits
    • invocation: GET /gettimeunits
    • signature: gettimeunits(req::HTTP.Request;) -> GetTimeUnitsResponse
  • getgridorigin
    • invocation: GET /getgridorigin/{grid}
    • signature: getgridorigin(req::HTTP.Request, grid::Int64;) -> Vector{Float64}
  • getgridshape
    • invocation: GET /getgridshape/{grid}
    • signature: getgridshape(req::HTTP.Request, grid::Int64;) -> Vector{Int64}
  • getgridspacing
    • invocation: GET /getgridspacing/{grid}
    • signature: getgridspacing(req::HTTP.Request, grid::Int64;) -> Vector{Float64}
  • getgridedge_count
    • invocation: GET /getgridedge_count/{grid}
    • signature: getgridedge_count(req::HTTP.Request, grid::Int64;) -> Int64
  • getgridedge_nodes
    • invocation: GET /getgridedge_nodes/{grid}
    • signature: getgridedge_nodes(req::HTTP.Request, grid::Int64;) -> Vector{Int64}
  • getgridface_count
    • invocation: GET /getgridface_count/{grid}
    • signature: getgridface_count(req::HTTP.Request, grid::Int64;) -> Int64
  • getgridface_edges
    • invocation: GET /getgridface_edges/{grid}
    • signature: getgridface_edges(req::HTTP.Request, grid::Int64;) -> Vector{Int64}
  • getgridface_nodes
    • invocation: GET /getgridface_nodes/{grid}
    • signature: getgridface_nodes(req::HTTP.Request, grid::Int64;) -> Vector{Int64}
  • getgridnode_count
    • invocation: GET /getgridnode_count/{grid}
    • signature: getgridnode_count(req::HTTP.Request, grid::Int64;) -> Int64
  • getgridnodesperface
    • invocation: GET /getgridnodesperface/{grid}
    • signature: getgridnodesperface(req::HTTP.Request, grid::Int64;) -> Vector{Int64}
  • getvargrid
    • invocation: GET /getvargrid/{name}
    • signature: getvargrid(req::HTTP.Request, name::String;) -> Int64
  • getvaritemsize
    • invocation: GET /getvaritemsize/{name}
    • signature: getvaritemsize(req::HTTP.Request, name::String;) -> Int64
  • getvarlocation
    • invocation: GET /getvarlocation/{name}
    • signature: getvarlocation(req::HTTP.Request, name::String;) -> GetVarLocationResponseLocation
  • getvarnbytes
    • invocation: GET /getvarnbytes/{name}
    • signature: getvarnbytes(req::HTTP.Request, name::String;) -> Int64
  • getvartype
    • invocation: GET /getvartype/{name}
    • signature: getvartype(req::HTTP.Request, name::String;) -> GetVarTypeResponse
  • getvarunits
    • invocation: GET /getvarunits/{name}
    • signature: getvarunits(req::HTTP.Request, name::String;) -> GetVarUnitsResponse
source
RemoteBMI.Server.BmiServer.ProblemDetails — Type

ProblemDetails Definition from https://datatracker.ietf.org/doc/html/rfc9457#name-json-schema-for-http-proble

ProblemDetails(;
    type=nothing,
    title=nothing,
    status=nothing,
    detail=nothing,
    instance=nothing,
)

- type::String : A URI reference that identifies the problem type.
- title::String : A short, human-readable summary of the problem type.
- status::Int64 : The HTTP status code generated by the origin server for this occurrence of the problem.
- detail::String : A human-readable explanation specific to this occurrence of the problem. 
- instance::String : A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
source
RemoteBMI.Server.BmiServer.register — Method

Register handlers for all APIs in this module in the supplied Router instance.

Paramerets:

  • router: Router to register handlers in
  • impl: module that implements the server methods

Optional parameters:

  • path_prefix: prefix to be applied to all paths
  • optional_middlewares: Register one or more optional middlewares to be applied to all requests.

Optional middlewares can be one or more of: - init: called before the request is processed - pre_validation: called after the request is parsed but before validation - pre_invoke: called after validation but before the handler is invoked - post_invoke: called after the handler is invoked but before the response is sent

The order in which middlewares are invoked are: init |> read |> pre_validation |> validate |> pre_invoke |> invoke |> post_invoke

source

Client

Client generated code

RemoteBMI.Client.BmiClient.ProblemDetails — Type

ProblemDetails Definition from https://datatracker.ietf.org/doc/html/rfc9457#name-json-schema-for-http-proble

ProblemDetails(;
    type=nothing,
    title=nothing,
    status=nothing,
    detail=nothing,
    instance=nothing,
)

- type::String : A URI reference that identifies the problem type.
- title::String : A short, human-readable summary of the problem type.
- status::Int64 : The HTTP status code generated by the origin server for this occurrence of the problem.
- detail::String : A human-readable explanation specific to this occurrence of the problem. 
- instance::String : A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
source
RemoteBMI.Client.BmiClient.get_var_grid — Method

Each input and output variable is defined on a grid. This function returns the grid identifier for a given variable.

Params:

  • name::String (required)

Return: Int64, OpenAPI.Clients.ApiResponse

source
RemoteBMI.Client.BmiClient.get_var_nbytes — Method

Provides the total amount of memory used to store a variable; i.e., the number of items multiplied by the size of each item.

Params:

  • name::String (required)

Return: Int64, OpenAPI.Clients.ApiResponse

source
RemoteBMI.Client.BmiClient.initialize — Method

Performs all tasks that are to take place before entering the model’s time loop.

Params:

  • initialize_request::InitializeRequest (required)

Return: Nothing, OpenAPI.Clients.ApiResponse

source