e.g.
ramp
{
type quadratic;
start 200;
duration 1.6;
}
but the old format is supported for backward compatibility:
ramp linear;
rampCoeffs
{
start 200;
duration 1.6;
}
- Include newline in beginBlock/endBlock, since this corresponds to
the standard usage. The beginBlock now takes keyType instead of word.
- Provide Ostream::writeEntry method to reduce clutter and simplify
writing of entries.
Before
======
os << indent << "name" << nl
<< indent << token::BEGIN_BLOCK << incrIndent << nl;
os.writeKeyword("key1") << val1 << token::END_STATEMENT << nl;
os.writeKeyword("key2") << val2 << token::END_STATEMENT << nl;
os << decrIndent << indent << token::END_BLOCK << nl;
After
=====
os.beginBlock("name");
os.writeEntry("key1", val1);
os.writeEntry("key2", val2);
os.endBlock();
- For completeness, support inline use of various Ostream methods.
For example,
os << beginBlock;
os.writeEntry("key1", val1);
os.writeEntry("key2", val2);
os << endBlock;
- For those who wish to write in long form, can also use endEntry inline:
os.beginBlock("name");
os.writeKeyword("key1") << val2 << endEntry;
os.writeKeyword("key2") << val2 << endEntry;
os.endBlock();
The endEntry encapsulates a semi-colon, newline combination.
with optional specification of the mark/space ratio
Templated square-wave function with support for an offset level.
\f[
a square(f (t - t_0)) s + l
\f]
where
\f$ square(t) \f$ is the square-wave function in range \f$ [-1, 1] \f$
with a mark/space ratio of \f$ r \f$
\vartable
symbol | Description | Data type | Default
a | Amplitude | Function1<scalar> |
f | Frequency [1/s] | Function1<scalar> |
s | Type scale factor | Function1<Type> |
l | Type offset level | Function1<Type> |
t_0 | Start time [s] | scalar | 0
r | mark/space ratio | scalar | 1
t | Time [s] | scalar
\endvartable
Example for a scalar:
\verbatim
<entryName> square;
<entryName>Coeffs
{
frequency 10;
amplitude 0.1;
scale 2e-6;
level 2e-6;
}
\endverbatim