|
@@ -26,25 +26,34 @@
|
|
|
namespace Protocol
|
|
|
{
|
|
|
extern "C" {
|
|
|
- LIBMATH_API bool Parse_USB(UsbDecodeOptions option, const EdgePulseDataTwoLevels& edge_pluses_data1,
|
|
|
- const EdgePulseDataTwoLevels& edge_pluses_data2, UsbDecodeResult& result);
|
|
|
+ LIBMATH_API bool Parse_USB(UsbDecodeOptions option, const EdgePulseDataTwoLevels& edge_pluses_data1,
|
|
|
+ const EdgePulseDataTwoLevels& edge_pluses_data2, UsbDecodeResult& result);
|
|
|
|
|
|
|
|
|
- LIBMATH_API bool Parse_RS232(const ProtocolRS232Options& options,
|
|
|
- const EdgePulseDataTwoLevels& edgePulseData,
|
|
|
- RS232DecodeResult& decodeResult);
|
|
|
+ LIBMATH_API bool Parse_RS232(const ProtocolRS232Options& options,
|
|
|
+ const EdgePulseDataTwoLevels& edgePulseData,
|
|
|
+ RS232DecodeResult& decodeResult);
|
|
|
|
|
|
- // LIBMATH_API bool quantizeParamsDecodeRS232(const QuantizeParams& quantizeParams,
|
|
|
- // const ProtocolRS232Options& options,
|
|
|
- // RS232DecodeResult& decodeResult);
|
|
|
+ // LIBMATH_API bool quantizeParamsDecodeRS232(const QuantizeParams& quantizeParams,
|
|
|
+ // const ProtocolRS232Options& options,
|
|
|
+ // RS232DecodeResult& decodeResult);
|
|
|
|
|
|
|
|
|
- inline LIBMATH_API void SetCancellationSignal(bool value)
|
|
|
- {
|
|
|
- canceled = value;
|
|
|
- }
|
|
|
+ inline LIBMATH_API void SetCancellationSignal(bool value)
|
|
|
+ {
|
|
|
+ canceled = value;
|
|
|
+ }
|
|
|
|
|
|
- LIBMATH_API void GetVersionExport(uint8_t* version);
|
|
|
+ inline LIBMATH_API void GetVersionExport(uint8_t* version)
|
|
|
+ {
|
|
|
+ // 将字符串转换为字符数组
|
|
|
+ constexpr char version_string[] = DLL_VERSION;
|
|
|
|
|
|
+ // 遍历字符串,将其转换为字节数组
|
|
|
+ for (size_t i = 0; i < sizeof(version_string); ++i)
|
|
|
+ {
|
|
|
+ version[i] = static_cast<unsigned char>(version_string[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|