From d30316456b4691b68c4cfc0a0315b3edc94c767d Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson <cont-frb@ulund.org> Date: Tue, 29 Aug 2017 10:40:34 +0200 Subject: [PATCH] Update docs --- src/interface_implementations/ballandbeam.jl | 13 +++++++++++++ src/interface_implementations/eth_helicopter.jl | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/interface_implementations/ballandbeam.jl b/src/interface_implementations/ballandbeam.jl index db014af..a1dc73f 100644 --- a/src/interface_implementations/ballandbeam.jl +++ b/src/interface_implementations/ballandbeam.jl @@ -11,6 +11,19 @@ export Beam, BeamSimulator, AbstractBeam, BallAndBeam, BallAndBeamSimulator, AbstractBeamOrBallAndBeam +# @with_kw allows specification of default values for fields. If none is given, this value must be supplied by the user. replaces many constructors that would otherwise only supply default values. +# Call constructor like Beam(bias=1.0) if you want a non-default value for bias +""" + Beam(;kwargs...) +Physical beam process + +#Arguments (fields) +- `h::Float64 = 0.01` +- `bias::Float64 = 0.0` +- `stream::LabStream = ComediStream()` +- `measure::AnalogInput10V = AnalogInput10V(0)` +- `control::AnalogOutput10V = AnalogOutput10V(1)` +""" @with_kw struct Beam <: PhysicalProcess h::Float64 = 0.01 bias::Float64 = 0.0 diff --git a/src/interface_implementations/eth_helicopter.jl b/src/interface_implementations/eth_helicopter.jl index 71bf494..aab34a8 100644 --- a/src/interface_implementations/eth_helicopter.jl +++ b/src/interface_implementations/eth_helicopter.jl @@ -7,6 +7,20 @@ export ETHHelicopter, ETHHelicopterSimulator, AbstractETHHelicopter +# @with_kw allows specification of default values for fields. If none is given, this value must be supplied by the user. replaces many constructors that would otherwise only supply default values. +# Call constructor like ETHHelicopter(bias=1.0) if you want a non-default value for bias +""" + ETHHelicopter(;kwargs...) + Physical ETH helicopter process +# Arguments (fields) +- `h::Float64 = 0.05` +- `bias::Float64 = 0.0` +- `stream::LabStream = ComediStream()` +- `measure1::AnalogInput10V = AnalogInput10V(0)` +- `measure2::AnalogInput10V = AnalogInput10V(1)` +- `control1::AnalogOutput10V = AnalogOutput10V(0)` +- `control2::AnalogOutput10V = AnalogOutput10V(1)` +""" @with_kw struct ETHHelicopter <: PhysicalProcess h::Float64 = 0.05 bias::Float64 = 0.0 -- GitLab