Skip to content

Commit

Permalink
Fixed minor build problem in MdfLibrary and in DotNet studio build
Browse files Browse the repository at this point in the history
  • Loading branch information
ihedvall committed Dec 11, 2024
1 parent cd7e105 commit 111c020
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
7 changes: 5 additions & 2 deletions mdflibrary/src/MdfExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* Copyright 2023 Simplxs
* SPDX-License-Identifier: MIT
*/
#if defined(_WIN32)
#define _CRT_SECURE_NO_WARNINGS
#endif

#include <mdf/ichannelgroup.h>
#include <mdf/idatagroup.h>
Expand Down Expand Up @@ -91,8 +94,8 @@ EXPORTFEATUREFUNC(void, SetPreTrigTime, double pre_trig_time) {
}
EXPORTFEATUREFUNC(uint64_t, GetStartTime) { return writer->StartTime(); }
EXPORTFEATUREFUNC(uint64_t, GetStopTime) { return writer->StopTime(); }
EXPORTFEATUREFUNC(MdfBusType, GetBusType) { return writer->BusType(); }
EXPORTFEATUREFUNC(void, SetBusType, MdfBusType type) { writer->BusType(type); }
EXPORTFEATUREFUNC(uint16_t, GetBusType) { return writer->BusType(); }
EXPORTFEATUREFUNC(void, SetBusType, uint16_t type) { writer->BusType(type); }
EXPORTFEATUREFUNC(MdfStorageType, GetStorageType) {
return writer->StorageType();
}
Expand Down
2 changes: 1 addition & 1 deletion mdflibrary/src/MdfWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ uint64_t MdfWriter::StopTime::get() {

void MdfWriter::BusType::set(MdfBusType type) {
if (writer_ != nullptr) {
writer_->BusType(static_cast<mdf::MdfBusType>(type));
writer_->BusType(static_cast<uint16_t>(type));
}
}

Expand Down
14 changes: 7 additions & 7 deletions mdflibrary/src/MdfWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ namespace MdfLibrary {
* Enumerate that is used when doing bus logging. The enumerate is used when
* creating default channel and channel group names.
*/
public enum class MdfBusType : int {
CAN, ///< CAN or CAN-FD bus
LIN, ///< LIN bus
FlexRay, ///< FlexRay bus
MOST, ///< MOST bus
Ethernet, ///< Ethernet bus
UNKNOWN ///< Unknown bus type (Default)
public enum class MdfBusType : uint16_t {
CAN = 0x0001, ///< CAN or CAN-FD bus
LIN = 0x0002, ///< LIN bus
FlexRay = 0x0004, ///< FlexRay bus
MOST = 0x0008, ///< MOST bus
Ethernet = 0x0010, ///< Ethernet bus
UNKNOWN = 0x0000 ///< Unknown bus type (Default)
};

/** \brief MDF writer types. */
Expand Down

0 comments on commit 111c020

Please sign in to comment.