Commit 839bfdaa authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

More docstrings

parent c028d268
...@@ -4,9 +4,12 @@ export num_outputs, ...@@ -4,9 +4,12 @@ export num_outputs,
outputrange, outputrange,
inputrange, inputrange,
isstable, isstable,
isasstable,
sampletime, sampletime,
control, control,
measure measure,
initialize,
finalize
# Interface specification =================================================================== # Interface specification ===================================================================
abstract type AbstractProcess end abstract type AbstractProcess end
......
...@@ -5,60 +5,85 @@ ...@@ -5,60 +5,85 @@
Base abstract type for all lab processes. This should not be inherited from directly, see [`PhysicalProcess`](@ref), [`SimulatedProcess`](@ref) Base abstract type for all lab processes. This should not be inherited from directly, see [`PhysicalProcess`](@ref), [`SimulatedProcess`](@ref)
""" """
AbstractProcess AbstractProcess
""" """
PhysicalProcess PhysicalProcess
Pysical processes should inherit from this abstract type. Pysical processes should inherit from this abstract type.
""" """
PhysicalProcess PhysicalProcess
""" """
SimulatedProcess SimulatedProcess
Simulated processes should inherit from this abstract type. Simulated processes should inherit from this abstract type.
""" """
SimulatedProcess SimulatedProcess
""" """
ny = num_outputs(P::AbstractProcess) ny = num_outputs(P::AbstractProcess)
Return the number of outputs (measurement signals) of the process. Return the number of outputs (measurement signals) of the process.
""" """
num_outputs num_outputs
""" """
nu = num_inputs(P::AbstractProcess) nu = num_inputs(P::AbstractProcess)
Return the number of inputs (control signals) of the process. Return the number of inputs (control signals) of the process.
""" """
num_inputs num_inputs
""" """
range = outputrange(P::AbstractProcess) range = outputrange(P::AbstractProcess)
Return the range of outputs (measurement signals) of the process. `range` is a vector of Return the range of outputs (measurement signals) of the process. `range` is a vector of
tuples, `length(range) = num_outputs(P), eltype(range) = Tuple(Real, Real)` tuples, `length(range) = num_outputs(P), eltype(range) = Tuple(Real, Real)`
""" """
outputrange outputrange
""" """
inputrange(P::AbstractProcess) inputrange(P::AbstractProcess)
Return the range of inputs (control signals) of the process. `range` is a vector of Return the range of inputs (control signals) of the process. `range` is a vector of
tuples, `length(range) = num_inputs(P), eltype(range) = Tuple(Real, Real)` tuples, `length(range) = num_inputs(P), eltype(range) = Tuple(Real, Real)`
""" """
inputrange inputrange
""" """
isstable(P::AbstractProcess) isstable(P::AbstractProcess)
Return true/false indicating whether or not the process is stable Return true/false indicating whether or not the process is stable
""" """
isstable isstable
""" """
isasstable(P::AbstractProcess) isasstable(P::AbstractProcess)
Return true/false indicating whether or not the process is asymptotically stable Return true/false indicating whether or not the process is asymptotically stable
""" """
isasstable isasstable
""" """
h = sampletime(P::AbstractProcess) h = sampletime(P::AbstractProcess)
Return the sample time of the process in seconds. Return the sample time of the process in seconds.
""" """
sampletime sampletime
""" """
control(P::AbstractProcess, u) control(P::AbstractProcess, u)
Send a control signal to the process. `u` must have dimension equal to `num_inputs(P)` Send a control signal to the process. `u` must have dimension equal to `num_inputs(P)`
""" """
control control
""" """
y = measure(P::AbstractProcess) y = measure(P::AbstractProcess)
Return a measurement from the process. `y` has length `num_outputs(P)` Return a measurement from the process. `y` has length `num_outputs(P)`
""" """
measure measure
"""
initialize(P::AbstractProcess)
This function is called before any control or measurement operations are performed. During a call to `initialize`, one might set up external communications etc. After control is done,
the function [`finalize`](@ref) is called.
"""
initialize
"""
finalize(P::AbstractProcess)
This function is called after any control or measurement operations are performed. During a call to `finalize`, one might finalize external communications etc. Before control is done,
the function [`initialize`](@ref) is called.
"""
finalize
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment