I'm new to swift so please bare with me. I noticed that in McuManager.swift we have this piece of code:
extension McuMgrReturnCode: CustomStringConvertible {
public var description: String {
switch self {
case .ok:
return "OK (0)"
case .unknown:
return "Unknown (1)"
case .noMemory:
return "No Memory (2)"
case .inValue:
return "In Value (3)"
case .timeout:
return "Timeout (4)"
case .noEntry:
return "No Entry (5)"
case .badState:
return "Bad State (1)"
default:
return "Unrecognized (\(rawValue))"
}
}
}
When an upload fails the following callback gets triggered:
How can I get the integer error-code (McuMgrReturnCode) from the 'error' parameter? Is it even possible or is it a lost cause? Appreciate any insights.
I'm new to swift so please bare with me. I noticed that in McuManager.swift we have this piece of code:
When an upload fails the following callback gets triggered:
How can I get the integer error-code (McuMgrReturnCode) from the 'error' parameter? Is it even possible or is it a lost cause? Appreciate any insights.