Commit c028d268 authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

Add docstrings

parent 1dbc5b87
......@@ -18,6 +18,7 @@ num_inputs(p::AbstractProcess) = error("Function not implemented for $(typeof(p
outputrange(p::AbstractProcess) = error("Function not implemented for $(typeof(p))")
inputrange(p::AbstractProcess) = error("Function not implemented for $(typeof(p))")
isstable(p::AbstractProcess) = error("Function not implemented for $(typeof(p))")
isasstable(p::AbstractProcess) = error("Function not implemented for $(typeof(p))")
sampletime(p::AbstractProcess) = error("Function not implemented for $(typeof(p))")
control(p::AbstractProcess, u) = error("Function not implemented for $(typeof(p))")
......
# This file contains all the docstrings so that the interface specification file is not cluttered
"""
AbstractProcess
Base abstract type for all lab processes. This should not be inherited from directly, see [`PhysicalProcess`](@ref), [`SimulatedProcess`](@ref)
"""
AbstractProcess
"""
PhysicalProcess
Pysical processes should inherit from this abstract type.
"""
PhysicalProcess
"""
SimulatedProcess
Simulated processes should inherit from this abstract type.
"""
SimulatedProcess
"""
ny = num_outputs(P::AbstractProcess)
Return the number of outputs (measurement signals) of the process.
"""
num_outputs
"""
nu = num_inputs(P::AbstractProcess)
Return the number of inputs (control signals) of the process.
"""
num_inputs
"""
range = outputrange(P::AbstractProcess)
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)`
"""
outputrange
"""
inputrange(P::AbstractProcess)
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)`
"""
inputrange
"""
isstable(P::AbstractProcess)
Return true/false indicating whether or not the process is stable
"""
isstable
"""
isasstable(P::AbstractProcess)
Return true/false indicating whether or not the process is asymptotically stable
"""
isasstable
"""
h = sampletime(P::AbstractProcess)
Return the sample time of the process in seconds.
"""
sampletime
"""
control(P::AbstractProcess, u)
Send a control signal to the process. `u` must have dimension equal to `num_inputs(P)`
"""
control
"""
y = measure(P::AbstractProcess)
Return a measurement from the process. `y` has length `num_outputs(P)`
"""
measure
......@@ -18,6 +18,7 @@ num_inputs(p::BallAndBeamType) = 1
outputrange(p::BallAndBeamType) = [(-10,10),(-1,1)] # Beam angle, Ball position
inputrange(p::BallAndBeamType) = [(-10,10)]
isstable(p::BallAndBeamType) = false
isstable(p::BallAndBeamType) = false
sampletime(p::BallAndBeamType) = p.h
control(p::BallAndBeam, u) = ccall((:comedi_write, comedipath),Int32,
......
export periodically, init_sysfilter, sysfilter!
export @periodically, init_sysfilter, sysfilter!
"""
@periodically(h, body)
......
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