Support software controllable termination

This commit is contained in:
Paul Hollinsky
2021-04-11 22:13:51 -04:00
parent c8bf1f26da
commit e82b5d15e0
16 changed files with 588 additions and 6 deletions
+9
View File
@@ -96,6 +96,9 @@ static constexpr const char* CANFD_NOT_SUPPORTED = "This device does not support
static constexpr const char* RTR_NOT_SUPPORTED = "RTR is not supported with CANFD.";
static constexpr const char* DEVICE_DISCONNECTED = "The device was disconnected.";
static constexpr const char* ONLINE_NOT_SUPPORTED = "This device does not support going online.";
static constexpr const char* TERMINATION_NOT_SUPPORTED_DEVICE = "This device does not support software selectable termination.";
static constexpr const char* TERMINATION_NOT_SUPPORTED_NETWORK = "This network does not support software selectable termination on this device.";
static constexpr const char* ANOTHER_IN_TERMINATION_GROUP_ENABLED = "A mutually exclusive network already has termination enabled.";
// Transport Errors
static constexpr const char* FAILED_TO_READ = "A read operation failed.";
@@ -193,6 +196,12 @@ const char* APIEvent::DescriptionForType(Type type) {
return DEVICE_DISCONNECTED;
case Type::OnlineNotSupported:
return ONLINE_NOT_SUPPORTED;
case Type::TerminationNotSupportedDevice:
return TERMINATION_NOT_SUPPORTED_DEVICE;
case Type::TerminationNotSupportedNetwork:
return TERMINATION_NOT_SUPPORTED_NETWORK;
case Type::AnotherInTerminationGroupEnabled:
return ANOTHER_IN_TERMINATION_GROUP_ENABLED;
// Transport Errors
case Type::FailedToRead: