123456789101112131415161718192021222324252627282930313233 |
- // // ******************************************************************
- // // /\ /| @File EdgePulse.cpp
- // // \ V/ @Brief
- // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
- // // / | @Creation 2024-3-14
- // // / \\ @Modified 2024-5-13
- // // *(__\_\
- // // ******************************************************************
- #include "EdgePulse.h"
- namespace Protocol
- {
- // int32_t EdgePulse::GetLength() const
- // {
- // return EndIndex > StartIndex && StartIndex > 0 ? EndIndex - StartIndex : 0;
- // }
- // TwoLevelEdgePulse::TwoLevelEdgePulse(TwoLevelEdgePulseStatusType current)
- // {
- // CurrentLevel = current;
- // }
- ThreeLevelEdgePulseStatusType ThreeLevelEdgePulse::ConvertToStatus(const bool highLevel, const bool lowLoglevel)
- {
- return static_cast<ThreeLevelEdgePulseStatusType>((highLevel ? 1 : 0) << 1 | (lowLoglevel ? 1 : 0));
- }
- ThreeLevelEdgePulse::ThreeLevelEdgePulse(ThreeLevelEdgePulseStatusType current)
- {
- CurrentLevel = current;
- }
- }
|