BS120x Ethernet Library 1.0.0
BS120x Ethernet Library
Loading...
Searching...
No Matches
CommonTypes.h File Reference

Contains common types for use with the Ethernet client. More...

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

Classes

struct  UnitStatus
 Information about unit health and status. More...
 
struct  OpModeConfig
 Operating mode configuration values. More...
 
struct  UnitConfig
 Information about the unit configuration. More...
 

Namespaces

namespace  bci
 Bloomy Controls root namespace.
 
namespace  bci::bs120x
 Contains BS120x-related code.
 

Typedefs

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

Enumerations

enum class  ErrorCode : int {
  kSuccess = 0 , kChannelIndexOutOfRange = -100 , kInvalidIPAddress = -101 , kAlreadyConnected = -102 ,
  kTcpAlreadyConnected = -103 , kUdpAlreadyConnected = -104 , kUdpSocketOpenFailed = -105 , kTcpSocketConfigFailed = -106 ,
  kUdpSocketConfigFailed = -107 , kUdpSocketBindFailed = -108 , kTcpConnectFailed = -109 , kReadFailed = -110 ,
  kSendFailed = -111 , kNotConnected = -112 , kFrameIdMismatch = -113 , kInvalidFrameSize = -114 ,
  kAiIndexOutOfRange = -115 , kDioIndexOutOfRange = -116 , kBufferTooSmall = -117 , kVoltageOutOfRange = -118 ,
  kCurrentOutOfRange = -119 , kReadbackTimedOut = -120 , kInvalidBoxId = -121 , kNoConfigData = -122 ,
  kInvalidConfigOption = -123 , kWrongConfigOptionType = -124 , kInvalidArgument = -125 , kAllocationFailed = -126 ,
  kUnexpectedException = -127
}
 Error codes returned by driver functions. More...
 

Functions

const char * ErrorMessage (ErrorCode ec) noexcept
 Get an error message string for a given error code.
 

Variables

constexpr unsigned int kCellCount {12U}
 Total cell count.
 
constexpr unsigned int kAnalogInputCount {8U}
 Total analog input count.
 
constexpr unsigned int kAnalogOutputCount {2U}
 Total analog output count.
 
constexpr unsigned int kDioCount {8U}
 Total DIO count.
 
constexpr unsigned int kFanCount {4U}
 Total fan count.
 
constexpr unsigned int kTempCount {3U}
 Total temperature sensor count.
 

Detailed Description

Contains common types for use with the Ethernet client.