Skip to content

Commit ca71b08

Browse files
committed
TwoLevelTrigger: added doxygen comments
1 parent bb70f93 commit ca71b08

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

scopehal/TwoLevelTrigger.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/***********************************************************************************************************************
22
* *
3-
* libscopehal v0.1 *
3+
* libscopehal *
44
* *
5-
* Copyright (c) 2012-2021 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -27,6 +27,13 @@
2727
* *
2828
***********************************************************************************************************************/
2929

30+
/**
31+
@file
32+
@author Andrew D. Zonenberg
33+
@brief Implementation of TwoLevelTrigger
34+
@ingroup triggers
35+
*/
36+
3037
#include "scopehal.h"
3138
#include "TwoLevelTrigger.h"
3239

@@ -35,6 +42,11 @@ using namespace std;
3542
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3643
// Construction / destruction
3744

45+
/**
46+
@brief Create a two-level trigger
47+
48+
@param scope The oscilloscope to create the trigger for
49+
*/
3850
TwoLevelTrigger::TwoLevelTrigger(Oscilloscope* scope)
3951
: Trigger(scope)
4052
{

scopehal/TwoLevelTrigger.h

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/***********************************************************************************************************************
22
* *
3-
* libscopehal v0.1 *
3+
* libscopehal *
44
* *
5-
* Copyright (c) 2012-2021 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -31,34 +31,55 @@
3131
@file
3232
@author Andrew D. Zonenberg
3333
@brief Declaration of TwoLevelTrigger
34+
@ingroup triggers
3435
*/
3536
#ifndef TwoLevelTrigger_h
3637
#define TwoLevelTrigger_h
3738

3839
/**
3940
@brief Base class for all triggers that have two thresholds rather than one
41+
42+
@ingroup triggers
4043
*/
4144
class TwoLevelTrigger : public Trigger
4245
{
4346
public:
4447
TwoLevelTrigger(Oscilloscope* scope);
4548
virtual ~TwoLevelTrigger();
4649

47-
//Upper bound of range is the base class "trigger level"
50+
/**
51+
@brief Gets the upper of the two trigger levels
52+
53+
This is the base class "trigger level.
54+
*/
4855
float GetUpperBound()
4956
{ return GetLevel(); }
5057

51-
void SetUpperBound(float f)
52-
{ SetLevel(f); }
58+
/**
59+
@brief Sets the upper trigger level
60+
61+
This is the base class "trigger level.
5362
54-
//Lower bound
63+
@param level Trigger level
64+
*/
65+
void SetUpperBound(float level)
66+
{ SetLevel(level); }
67+
68+
///@brief Gets the lower of the two trigger levels
5569
float GetLowerBound()
5670
{ return m_parameters[m_lowername].GetFloatVal(); }
5771

72+
/**
73+
@brief Sets the lower trigger level
74+
75+
@param level Trigger level
76+
*/
5877
void SetLowerBound(float level)
5978
{ m_parameters[m_lowername].SetFloatVal(level); }
6079

6180
protected:
81+
82+
///@brief Name of the "lower threshold" parameter
6283
std::string m_lowername;
6384
};
6485

0 commit comments

Comments
 (0)