ifw-fcf 8.0.2
 
Loading...
Searching...
No Matches
ifw::fcf::devmgr::iodev Namespace Reference

IODev class header file. More...

Classes

class  IODev
 The IODev class. More...
 
struct  IODevChannel
 
class  IODevConfig
 sensor Configuration class More...
 
struct  IODevControllerData
 The IODevControllerData struct. More...
 
struct  IODevData
 The ChannelData struct. More...
 
class  IODevLcsIf
 Sensor Local Control System (LCS) Interface (IF) class. More...
 

Enumerations

enum  {
  HW_SUCCESS = 0 , HW_ERR_HW_NOT_OP = 1 , HW_ERR_WRONG_CMD = 2 , HW_ERR_INCONSISTENT = 3 ,
  HW_ERR_INIT_FAILURE = 4 , HW_ERR_ENABLE_FAILURE = 5 , HW_ERR_DISABLE_FAILURE = 6
}
 
enum  { RPC_SUCCESS = 0 , RPC_ERR_NOT_OP = -1 , RPC_ERR_NOT_OP_READY = -2 , RPC_ERR_NOT_OP_NOTREADY = -3 }
 

Functions

 REGISTER_DEVICE (IODev)
 
std::ostream & operator<< (std::ostream &dest, const IODevData &obj)
 

Variables

constexpr auto LOGGER_NAME = "iodev"
 
constexpr auto CI_NO_RPC = "norpc"
 
constexpr auto CI_SENSOR = "sensor"
 
constexpr auto CI_CHANNELS = "channels"
 
constexpr auto CI_NAME = "name"
 
constexpr auto CI_DESCRIPTION = "description"
 
constexpr auto CI_ALIAS = "alias"
 
constexpr auto CI_TYPE = "type"
 
constexpr auto CI_HEADER = "header"
 
constexpr auto CI_LOG = "log"
 
constexpr auto CI_UNIT = "unit"
 
constexpr auto CI_MAP = "map"
 
constexpr auto CI_VALUE = "value"
 
constexpr auto CI_NAMED_MAPPING = "named_values"
 
constexpr int SUBSTATE_OP_MONITORING = 200
 
constexpr auto SUBSTATE_OP_MONITORING_STR = "Monitoring"
 
const std::unordered_map< short, std::string > SUBSTATE_MAP
 
constexpr auto DI_TYPE_STR = "DI"
 
constexpr auto AI_TYPE_STR = "AI"
 
constexpr auto II_TYPE_STR = "II"
 
constexpr auto SI_TYPE_STR = "SI"
 
constexpr auto DO_TYPE_STR = "DO"
 
constexpr auto AO_TYPE_STR = "AO"
 
constexpr auto IO_TYPE_STR = "IO"
 
constexpr auto SO_TYPE_STR = "SO"
 
constexpr auto DI_CAT_STR = "diChannels"
 
constexpr auto AI_CAT_STR = "aiChannels"
 
constexpr auto II_CAT_STR = "iiChannels"
 
constexpr auto SI_CAT_STR = "siChannels"
 
constexpr auto DO_CAT_STR = "doChannels"
 
constexpr auto AO_CAT_STR = "aoChannels"
 
constexpr auto IO_CAT_STR = "ioChannels"
 
constexpr auto SO_CAT_STR = "soChannels"
 
constexpr auto RPC_SET_OUTPUTS = "rpcSetOutputs"
 
const std::unordered_map< std::string, std::string > IO_DEV_TYPE_MAP
 
const std::unordered_map< short, std::string > HW_ERRORS
 
template<typename T>
constexpr bool is_supported_scalar_v
 
const std::unordered_map< short, std::string > RPC_ERRORS
 

Detailed Description

IODev class header file.

SensorLcsIf class source file.

Sensor class source file.

SensorRpcErrors header file.

sensorLcsIf class header file.

SensorHwErrors header file.

IODevConfig class header file.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HW_SUCCESS 
HW_ERR_HW_NOT_OP 
HW_ERR_WRONG_CMD 
HW_ERR_INCONSISTENT 
HW_ERR_INIT_FAILURE 
HW_ERR_ENABLE_FAILURE 
HW_ERR_DISABLE_FAILURE 

◆ anonymous enum

anonymous enum
Enumerator
RPC_SUCCESS 
RPC_ERR_NOT_OP 
RPC_ERR_NOT_OP_READY 
RPC_ERR_NOT_OP_NOTREADY 

Function Documentation

◆ operator<<()

std::ostream & ifw::fcf::devmgr::iodev::operator<< ( std::ostream & dest,
const IODevData & obj )

◆ REGISTER_DEVICE()

ifw::fcf::devmgr::iodev::REGISTER_DEVICE ( IODev )

Variable Documentation

◆ AI_CAT_STR

auto ifw::fcf::devmgr::iodev::AI_CAT_STR = "aiChannels"
constexpr

◆ AI_TYPE_STR

auto ifw::fcf::devmgr::iodev::AI_TYPE_STR = "AI"
constexpr

◆ AO_CAT_STR

auto ifw::fcf::devmgr::iodev::AO_CAT_STR = "aoChannels"
constexpr

◆ AO_TYPE_STR

auto ifw::fcf::devmgr::iodev::AO_TYPE_STR = "AO"
constexpr

◆ CI_ALIAS

auto ifw::fcf::devmgr::iodev::CI_ALIAS = "alias"
constexpr

◆ CI_CHANNELS

auto ifw::fcf::devmgr::iodev::CI_CHANNELS = "channels"
constexpr

◆ CI_DESCRIPTION

auto ifw::fcf::devmgr::iodev::CI_DESCRIPTION = "description"
constexpr

◆ CI_HEADER

auto ifw::fcf::devmgr::iodev::CI_HEADER = "header"
constexpr

◆ CI_LOG

auto ifw::fcf::devmgr::iodev::CI_LOG = "log"
constexpr

◆ CI_MAP

auto ifw::fcf::devmgr::iodev::CI_MAP = "map"
constexpr

◆ CI_NAME

auto ifw::fcf::devmgr::iodev::CI_NAME = "name"
constexpr

◆ CI_NAMED_MAPPING

auto ifw::fcf::devmgr::iodev::CI_NAMED_MAPPING = "named_values"
constexpr

◆ CI_NO_RPC

auto ifw::fcf::devmgr::iodev::CI_NO_RPC = "norpc"
constexpr

◆ CI_SENSOR

auto ifw::fcf::devmgr::iodev::CI_SENSOR = "sensor"
constexpr

◆ CI_TYPE

auto ifw::fcf::devmgr::iodev::CI_TYPE = "type"
constexpr

◆ CI_UNIT

auto ifw::fcf::devmgr::iodev::CI_UNIT = "unit"
constexpr

◆ CI_VALUE

auto ifw::fcf::devmgr::iodev::CI_VALUE = "value"
constexpr

◆ DI_CAT_STR

auto ifw::fcf::devmgr::iodev::DI_CAT_STR = "diChannels"
constexpr

◆ DI_TYPE_STR

auto ifw::fcf::devmgr::iodev::DI_TYPE_STR = "DI"
constexpr

◆ DO_CAT_STR

auto ifw::fcf::devmgr::iodev::DO_CAT_STR = "doChannels"
constexpr

◆ DO_TYPE_STR

auto ifw::fcf::devmgr::iodev::DO_TYPE_STR = "DO"
constexpr

◆ HW_ERRORS

const std::unordered_map<short, std::string> ifw::fcf::devmgr::iodev::HW_ERRORS
Initial value:
= {
{HW_ERR_HW_NOT_OP, "TwinCAT not in OP state or CouplerState not mapped"},
{HW_ERR_WRONG_CMD, "unknown command"},
{HW_ERR_INCONSISTENT, "inconsistent hardware signals"},
{HW_ERR_INIT_FAILURE, "init failure"},
{HW_ERR_ENABLE_FAILURE, "enable failure"},
{HW_ERR_DISABLE_FAILURE, "disable failure"},
}
@ HW_ERR_INCONSISTENT
Definition iodevHwErrors.hpp:20
@ HW_ERR_DISABLE_FAILURE
Definition iodevHwErrors.hpp:23
@ HW_ERR_INIT_FAILURE
Definition iodevHwErrors.hpp:21
@ HW_ERR_ENABLE_FAILURE
Definition iodevHwErrors.hpp:22
@ HW_ERR_WRONG_CMD
Definition iodevHwErrors.hpp:19
@ HW_ERR_HW_NOT_OP
Definition iodevHwErrors.hpp:18

◆ II_CAT_STR

auto ifw::fcf::devmgr::iodev::II_CAT_STR = "iiChannels"
constexpr

◆ II_TYPE_STR

auto ifw::fcf::devmgr::iodev::II_TYPE_STR = "II"
constexpr

◆ IO_CAT_STR

auto ifw::fcf::devmgr::iodev::IO_CAT_STR = "ioChannels"
constexpr

◆ IO_DEV_TYPE_MAP

const std::unordered_map<std::string, std::string> ifw::fcf::devmgr::iodev::IO_DEV_TYPE_MAP
Initial value:
= {
}
constexpr auto DI_CAT_STR
Definition iodevConfig.hpp:66
constexpr auto SO_TYPE_STR
Definition iodevConfig.hpp:64
constexpr auto AI_CAT_STR
Definition iodevConfig.hpp:67
constexpr auto IO_CAT_STR
Definition iodevConfig.hpp:73
constexpr auto AI_TYPE_STR
Definition iodevConfig.hpp:57
constexpr auto AO_CAT_STR
Definition iodevConfig.hpp:72
constexpr auto DO_TYPE_STR
Definition iodevConfig.hpp:61
constexpr auto II_TYPE_STR
Definition iodevConfig.hpp:58
constexpr auto II_CAT_STR
Definition iodevConfig.hpp:68
constexpr auto SO_CAT_STR
Definition iodevConfig.hpp:74
constexpr auto SI_TYPE_STR
Definition iodevConfig.hpp:59
constexpr auto DI_TYPE_STR
Definition iodevConfig.hpp:56
constexpr auto AO_TYPE_STR
Definition iodevConfig.hpp:62
constexpr auto IO_TYPE_STR
Definition iodevConfig.hpp:63
constexpr auto SI_CAT_STR
Definition iodevConfig.hpp:69
constexpr auto DO_CAT_STR
Definition iodevConfig.hpp:71

◆ IO_TYPE_STR

auto ifw::fcf::devmgr::iodev::IO_TYPE_STR = "IO"
constexpr

◆ is_supported_scalar_v

template<typename T>
bool ifw::fcf::devmgr::iodev::is_supported_scalar_v
constexpr
Initial value:
=
std::is_same_v<T, bool> ||
std::is_same_v<T, int> ||
std::is_same_v<T, unsigned int> ||
std::is_same_v<T, short> ||
std::is_same_v<T, double> ||
std::is_same_v<T, float> ||
std::is_same_v<T, uint8_t>

◆ LOGGER_NAME

auto ifw::fcf::devmgr::iodev::LOGGER_NAME = "iodev"
constexpr

◆ RPC_ERRORS

const std::unordered_map<short, std::string> ifw::fcf::devmgr::iodev::RPC_ERRORS
Initial value:
= {
{RPC_ERR_NOT_OP, "Cannot disable Sensor. Not in OP state"},
{RPC_ERR_NOT_OP_READY, "Cannot enable Sensor. Not in READY."},
{RPC_ERR_NOT_OP_NOTREADY, "Cannot init Sensor. Not in NOTREADY or FAILURE."}
}
@ RPC_ERR_NOT_OP_NOTREADY
Definition iodevRpcErrors.hpp:20
@ RPC_ERR_NOT_OP_READY
Definition iodevRpcErrors.hpp:19
@ RPC_ERR_NOT_OP
Definition iodevRpcErrors.hpp:18

◆ RPC_SET_OUTPUTS

auto ifw::fcf::devmgr::iodev::RPC_SET_OUTPUTS = "rpcSetOutputs"
constexpr

◆ SI_CAT_STR

auto ifw::fcf::devmgr::iodev::SI_CAT_STR = "siChannels"
constexpr

◆ SI_TYPE_STR

auto ifw::fcf::devmgr::iodev::SI_TYPE_STR = "SI"
constexpr

◆ SO_CAT_STR

auto ifw::fcf::devmgr::iodev::SO_CAT_STR = "soChannels"
constexpr

◆ SO_TYPE_STR

auto ifw::fcf::devmgr::iodev::SO_TYPE_STR = "SO"
constexpr

◆ SUBSTATE_MAP

const std::unordered_map<short, std::string> ifw::fcf::devmgr::iodev::SUBSTATE_MAP
Initial value:
= {
}
constexpr int SUBSTATE_ERROR
Definition deviceConfig.hpp:97
constexpr int SUBSTATE_READY
Definition deviceConfig.hpp:95
constexpr auto SUBSTATE_ERROR_STR
Definition deviceConfig.hpp:102
constexpr auto SUBSTATE_NOTREADY_STR
Definition deviceConfig.hpp:99
constexpr auto SUBSTATE_READY_STR
Definition deviceConfig.hpp:101
constexpr int SUBSTATE_OP_ERROR
Definition deviceConfig.hpp:105
constexpr int SUBSTATE_NOTREADY
Definition deviceConfig.hpp:94
constexpr auto SUBSTATE_OP_ERROR_STR
Definition deviceConfig.hpp:108
constexpr auto SUBSTATE_OP_MONITORING_STR
Definition iodevConfig.hpp:46
constexpr int SUBSTATE_OP_MONITORING
Definition iodevConfig.hpp:45

◆ SUBSTATE_OP_MONITORING

int ifw::fcf::devmgr::iodev::SUBSTATE_OP_MONITORING = 200
constexpr

◆ SUBSTATE_OP_MONITORING_STR

auto ifw::fcf::devmgr::iodev::SUBSTATE_OP_MONITORING_STR = "Monitoring"
constexpr