openmi.om.base | R Documentation |
Class providing the minimum attributes and methods for a model component
Has standard methods for iterating through timesteps and connecting with other components
R6 class of type openmi.om.base
name
is a unique identifier for this controller
code
is a unique identifier for this controller
debug
mode on/off
value
at current instance
data
from the larger context, including the parent. was arData in om
state
this objects local state. was state in om
inputs
linked to this object
components
contained by this object
host
name
type
of component
compid
is a unique identifier in this simulation domain
vars
is an array of variables that this requires for solving, determines op order
timer
is the object keepign time in simulation (set by parent controller)
id
is identifier (compid, name duplicates?)
new()
openmi.om.base$new(elem_list = list(), format = "raw")
elem_list
which properties to set on creation
format
format of elem_list
R6 class object
settable()
openmi.om.base$settable()
array of settable properties
set_prop()
openmi.om.base$set_prop(propname, propvalue, format = "raw")
propname
which attribute
propvalue
what value
format
of propvalue
NA
parse_openmi()
openmi.om.base$parse_openmi(propvalue)
propvalue
openmi formatted property list
a settable data value from openmi json type data description
parse_class_specific()
openmi.om.base$parse_class_specific(propvalue)
propvalue
from some custom classformat reading implementation
a settable data value
set_sub_prop()
set the value of a contained component (not a local class attribute)
openmi.om.base$set_sub_prop(propname, propvalue, format = "raw")
propname
which attribute
propvalue
what value
format
of propvalue
a settable data value
init()
initialize this component after first object creation
openmi.om.base$init()
NULL
set_vars()
set_vars finds all the input var names for this function
openmi.om.base$set_vars()
NULL
log_debug()
log_debug handles debug info
openmi.om.base$log_debug(debug_mesg)
debug_mesg
message to add to logger
NULL
getInputs()
get all input values from linked components
openmi.om.base$getInputs()
NULL
prepare()
execute things to do before model timestep execution
openmi.om.base$prepare()
NULL
step()
perform model timestep execution
openmi.om.base$step()
NULL
stepChildren()
execute child model timestep code
openmi.om.base$stepChildren()
NULL
update()
execute model timestep code
openmi.om.base$update()
NULL
finish()
do things at end of model step
openmi.om.base$finish()
NULL
validate()
Is this object valid?
openmi.om.base$validate()
logical TRUE/FALSE
logState()
log data at end of timestep
openmi.om.base$logState()
NULL
getValue()
get value of this object currently
openmi.om.base$getValue(name = "value")
name
a specific name from the state array, not just the default. TBD
value
addInput()
connect an input to this component
openmi.om.base$addInput( local_name = character(), object = openmi.om.base, remote_name = "", input_type = "numeric" )
local_name
name that will be referred to in local contest
object
is the actual R6 class to connect to
remote_name
is what property on the remote object are we accessing
input_type
is this is a number (most common), text or other?
value
addComponent()
add a contained sub-component (i.e. not linked)
openmi.om.base$addComponent(thiscomp = openmi.om.base)
thiscomp
an R6 classof open.mi type
value
add_component()
add a contained sub-component (i.e. not linked)
openmi.om.base$add_component(thiscomp = openmi.om.base)
thiscomp
an R6 classof open.mi type
components are small objects that reside inside this object
NULL
get_component_id()
return unique ID of component
openmi.om.base$get_component_id(thiscomp)
thiscomp
an R6 classof open.mi type
integer
orderOperations()
order contained sub-components
openmi.om.base$orderOperations()
NULL
asJSON()
format this object as openmi json
openmi.om.base$asJSON()
json text
clone()
The objects of this class are cloneable with this method.
openmi.om.base$clone(deep = FALSE)
deep
Whether to make a deep clone.
NA
NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.