This makes Amplitude Modulated Pulse Train, which can be regarded as the discretized wave of the signal. Pulse Train can be defined by frequency and duty cycle, which can be temporarily changed, referring to PWM.
Dependents: Interference_Simple
AMSignal Class Reference
Amplide Modulated Signal Model for AM Pulse Train Model More...
#include <AMSignal.h>
Public Member Functions | |
AMSignal (uint16_t const arg_freq=50, uint16_t const arg_freq_max=100, uint16_t const arg_ampl_max_u16=4095) | |
Constructor. | |
void | attachAMSignalExpression (Callback< uint16_t(AMSignal *)> arg_signal) |
Amplitude Modified Signal / Pulse Hight Writing Handler. | |
void | setFrequency (uint16_t const arg_freq) |
Frequency could be slightly modulated because it depends on the carrier freq. | |
void | setAmplitude (float const arg_ampl) |
Set Amplitude Paramiter. | |
float | getAmplitude_uf () |
Get a parameter which defines the size of pulse hight axis with in [0,1]. | |
uint16_t | getAmplitude_u16 () |
Get a parameter which defines the size of pulse hight axis with in [0, 4096]. |
Detailed Description
Amplide Modulated Signal Model for AM Pulse Train Model
All parameter data is dealed as unsigned 16 bit int.
- Version:
- alluint16
Definition at line 20 of file AMSignal.h.
Constructor & Destructor Documentation
AMSignal | ( | uint16_t const | arg_freq = 50 , |
uint16_t const | arg_freq_max = 100 , |
||
uint16_t const | arg_ampl_max_u16 = 4095 |
||
) |
Constructor.
Definition at line 24 of file AMSignal.h.
Member Function Documentation
void attachAMSignalExpression | ( | Callback< uint16_t(AMSignal *)> | arg_signal ) |
Amplitude Modified Signal / Pulse Hight Writing Handler.
For fast processing, no float culc nor div culc is recommended
- Parameters:
-
arg_signal Callback
- AMSignal* contains parameters of this.
- Return values:
-
is dealed as a factor the argument of Callback as Pulse rising.
Definition at line 40 of file AMSignal.h.
uint16_t getAmplitude_u16 | ( | ) |
Get a parameter which defines the size of pulse hight axis with in [0, 4096].
Definition at line 26 of file AMSignal.cpp.
float getAmplitude_uf | ( | ) |
Get a parameter which defines the size of pulse hight axis with in [0,1].
Definition at line 21 of file AMSignal.cpp.
void setAmplitude | ( | float const | arg_ampl ) |
Set Amplitude Paramiter.
- Crumping a value within [0f,1f], converted to [0, 0xFFFF]
- Note that this is a parameter which affects a pulse hight, but isn't the pulse hight itself
- The Pulse hight is defined in callback attached with attachAMSignalExpression()
Definition at line 10 of file AMSignal.cpp.
void setFrequency | ( | uint16_t const | arg_freq ) |
Frequency could be slightly modulated because it depends on the carrier freq.
Definition at line 3 of file AMSignal.cpp.
Generated on Tue Jul 12 2022 22:17:22 by 1.7.2