FIU Serial Library 1.0.0
FIU Serial Library
Loading...
Searching...
No Matches
CommonTypes.h File Reference

Defines common types for used with FIU client. More...

Include dependency graph for CommonTypes.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  FirmwareVersion
 FIU firmware version. More...

Namespaces

namespace  bci
 Bloomy Controls root namespace.
namespace  bci::fiu
 Contains FIU-related code.

Typedefs

template<class T>
using Result = tl::expected<T, ErrorCode>
 Result type used to return values or error codes from driver functions.

Enumerations

enum class  ChannelState : std::uint8_t {
  kDisconnected = 0 , kConnected = 1 , kVoltageMeasurement = 2 , kCurrentMeasurement = 3 ,
  kGroundFault = 4
}
 FIU channel states. More...
enum class  ErrorCode : int {
  kSuccess = 0 , kBoxIDOutOfRange = -1 , kChannelIndexOutOfRange = -2 , kInvalidArgument = -3 ,
  kInvalidResponse = -4 , kAlreadyConnected = -5 , kFailedToOpenPort = -6 , kFailedToConfigurePort = -7 ,
  kNotConnected = -8 , kSendFailed = -9 , kReadTimedOut = -10 , kReadFailed = -11 ,
  kChecksumMismatch = -12 , kSyntaxError = -13 , kSystemInterlocked = -14 , kResourceConflict = -15 ,
  kUnknownDeviceError = -16 , kInvalidObject = -17 , kBufferTooSmall = -18 , kAllocationFailed = -19 ,
  kUnexpectedException = -20
}
 Error codes returned by the driver. More...

Functions

FIU_API const char * ErrorMessage (ErrorCode ec) noexcept
 Get a string describing an error code.

Variables

constexpr unsigned int kChannelCount {24U}
 FIU channel count.

Detailed Description

Defines common types for used with FIU client.