ifw-fcf  3.0.0
Classes | Enumerations | Functions | Variables
fcf::devmgr::shutter Namespace Reference

Classes

class  Shutter
 The Shutter class. More...
 
class  ShutterConfig
 Shutter Configuration class. More...
 
struct  ShutterControllerData
 The ShutterControllerData struct. More...
 
class  ShutterLcsIf
 Shutter Local Control System (LCS) Interface (IF) class. More...
 

Enumerations

enum  {
  HW_SUCCESS = 0, HW_ERR_HW_NOT_OP = 1, HW_ERR_INIT_FAILURE = 2, HW_ERR_UNEXPECTED_CLOSED = 3,
  HW_ERR_UNEXPECTED_NONE = 4, HW_ERR_UNEXPECTED_OPENED = 5, HW_ERR_FAULT_SIG = 6, HW_ERR_BOTH_SIG_ACTIVE = 7,
  HW_ERR_TIMEOUT_ENABLE = 8, HW_ERR_TIMEOUT_DISABLE = 9, HW_ERR_TIMEOUT_INIT = 10, HW_ERR_TIMEOUT_CLOSE = 11,
  HW_ERR_TIMEOUT_OPEN = 12, RPC_SUCCESS = 0, RPC_ERR_NOT_OP = -1, RPC_ERR_NOT_OP_READY = -2,
  RPC_ERR_NOT_OP_NOTREADY = -3, RPC_ERR_STILL_OPENNING = -4, RPC_ERR_STILL_CLOSING = -5, RPC_ERR_LOCAL = -6
}
 
enum  {
  HW_SUCCESS = 0, HW_ERR_HW_NOT_OP = 1, HW_ERR_INIT_FAILURE = 2, HW_ERR_UNEXPECTED_CLOSED = 3,
  HW_ERR_UNEXPECTED_NONE = 4, HW_ERR_UNEXPECTED_OPENED = 5, HW_ERR_FAULT_SIG = 6, HW_ERR_BOTH_SIG_ACTIVE = 7,
  HW_ERR_TIMEOUT_ENABLE = 8, HW_ERR_TIMEOUT_DISABLE = 9, HW_ERR_TIMEOUT_INIT = 10, HW_ERR_TIMEOUT_CLOSE = 11,
  HW_ERR_TIMEOUT_OPEN = 12, RPC_SUCCESS = 0, RPC_ERR_NOT_OP = -1, RPC_ERR_NOT_OP_READY = -2,
  RPC_ERR_NOT_OP_NOTREADY = -3, RPC_ERR_STILL_OPENNING = -4, RPC_ERR_STILL_CLOSING = -5, RPC_ERR_LOCAL = -6
}
 

Functions

 REGISTER_DEVICE (Shutter)
 

Variables

constexpr auto CI_ACTIVE_LOW_CLOSED = "low_closed"
 
constexpr auto CI_ACTIVE_LOW_FAULT = "low_fault"
 
constexpr auto CI_ACTIVE_LOW_OPEN = "low_open"
 
constexpr auto CI_ACTIVE_LOW_SWITCH = "low_switch"
 
constexpr auto CI_IGNORE_CLOSED = "ignore_closed"
 
constexpr auto CI_IGNORE_FAULT = "ignore_fault"
 
constexpr auto CI_IGNORE_OPEN = "ignore_open"
 
constexpr auto CI_INITIAL_STATE = "initial_state"
 
constexpr auto CI_TIMEOUT = "timeout"
 
constexpr bool DEFAULT_ACTIVE_LOW_CLOSE = false
 
constexpr bool DEFAULT_ACTIVE_LOW_FAULT = false
 
constexpr bool DEFAULT_ACTIVE_LOW_OPEN = false
 
constexpr bool DEFAULT_ACTIVE_LOW_SWITCH = false
 
constexpr bool DEFAULT_IGNORE_CLOSED = false
 
constexpr bool DEFAULT_IGNORE_FAULT = false
 
constexpr bool DEFAULT_IGNORE_OPEN = false
 
constexpr bool DEFAULT_INITIAL_STATE = false
 
constexpr unsigned int DEFAULT_TIMEOUT = 10000
 
constexpr auto RPC_OPEN = "rpcOpen"
 
constexpr auto RPC_CLOSE = "rpcClose"
 
constexpr short SUBSTATE_READY_CLOSE = 105
 
constexpr short SUBSTATE_READY_OPEN = 106
 
constexpr short SUBSTATE_OP_CLOSE = 212
 
constexpr short SUBSTATE_OP_CLOSING = 213
 
constexpr short SUBSTATE_OP_OPEN = 214
 
constexpr short SUBSTATE_OP_OPENING = 215
 
constexpr auto SUBSTATE_READY_CLOSE_STR = "Ready/Close"
 
constexpr auto SUBSTATE_READY_OPEN_STR = "Ready/Open"
 
constexpr auto SUBSTATE_OP_CLOSE_STR = "Close"
 
constexpr auto SUBSTATE_OP_CLOSING_STR = "Closing"
 
constexpr auto SUBSTATE_OP_OPEN_STR = "Open"
 
constexpr auto SUBSTATE_OP_OPENING_STR = "Opening"
 
const std::unordered_map< short, std::string > SubstateMap
 
const std::vector< std::string > cfgMapping
 
const std::vector< std::string > statMapping
 
const std::vector< std::string > rpcMapping
 
const std::unordered_map< short, std::string > hw_errors
 
const std::unordered_map< short, std::string > rpc_errors
 

Enumeration Type Documentation

◆ anonymous enum [1/2]

anonymous enum
Enumerator
HW_SUCCESS 
HW_ERR_HW_NOT_OP 
HW_ERR_INIT_FAILURE 
HW_ERR_UNEXPECTED_CLOSED 
HW_ERR_UNEXPECTED_NONE 
HW_ERR_UNEXPECTED_OPENED 
HW_ERR_FAULT_SIG 
HW_ERR_BOTH_SIG_ACTIVE 
HW_ERR_TIMEOUT_ENABLE 
HW_ERR_TIMEOUT_DISABLE 
HW_ERR_TIMEOUT_INIT 
HW_ERR_TIMEOUT_CLOSE 
HW_ERR_TIMEOUT_OPEN 
RPC_SUCCESS 
RPC_ERR_NOT_OP 
RPC_ERR_NOT_OP_READY 
RPC_ERR_NOT_OP_NOTREADY 
RPC_ERR_STILL_OPENNING 
RPC_ERR_STILL_CLOSING 
RPC_ERR_LOCAL 

◆ anonymous enum [2/2]

anonymous enum
Enumerator
HW_SUCCESS 
HW_ERR_HW_NOT_OP 
HW_ERR_INIT_FAILURE 
HW_ERR_UNEXPECTED_CLOSED 
HW_ERR_UNEXPECTED_NONE 
HW_ERR_UNEXPECTED_OPENED 
HW_ERR_FAULT_SIG 
HW_ERR_BOTH_SIG_ACTIVE 
HW_ERR_TIMEOUT_ENABLE 
HW_ERR_TIMEOUT_DISABLE 
HW_ERR_TIMEOUT_INIT 
HW_ERR_TIMEOUT_CLOSE 
HW_ERR_TIMEOUT_OPEN 
RPC_SUCCESS 
RPC_ERR_NOT_OP 
RPC_ERR_NOT_OP_READY 
RPC_ERR_NOT_OP_NOTREADY 
RPC_ERR_STILL_OPENNING 
RPC_ERR_STILL_CLOSING 
RPC_ERR_LOCAL 

Function Documentation

◆ REGISTER_DEVICE()

fcf::devmgr::shutter::REGISTER_DEVICE ( Shutter  )

Variable Documentation

◆ cfgMapping

const std::vector<std::string> fcf::devmgr::shutter::cfgMapping
Initial value:

◆ CI_ACTIVE_LOW_CLOSED

constexpr auto fcf::devmgr::shutter::CI_ACTIVE_LOW_CLOSED = "low_closed"
constexpr

◆ CI_ACTIVE_LOW_FAULT

constexpr auto fcf::devmgr::shutter::CI_ACTIVE_LOW_FAULT = "low_fault"
constexpr

◆ CI_ACTIVE_LOW_OPEN

constexpr auto fcf::devmgr::shutter::CI_ACTIVE_LOW_OPEN = "low_open"
constexpr

◆ CI_ACTIVE_LOW_SWITCH

constexpr auto fcf::devmgr::shutter::CI_ACTIVE_LOW_SWITCH = "low_switch"
constexpr

◆ CI_IGNORE_CLOSED

constexpr auto fcf::devmgr::shutter::CI_IGNORE_CLOSED = "ignore_closed"
constexpr

◆ CI_IGNORE_FAULT

constexpr auto fcf::devmgr::shutter::CI_IGNORE_FAULT = "ignore_fault"
constexpr

◆ CI_IGNORE_OPEN

constexpr auto fcf::devmgr::shutter::CI_IGNORE_OPEN = "ignore_open"
constexpr

◆ CI_INITIAL_STATE

constexpr auto fcf::devmgr::shutter::CI_INITIAL_STATE = "initial_state"
constexpr

◆ CI_TIMEOUT

constexpr auto fcf::devmgr::shutter::CI_TIMEOUT = "timeout"
constexpr

◆ DEFAULT_ACTIVE_LOW_CLOSE

constexpr bool fcf::devmgr::shutter::DEFAULT_ACTIVE_LOW_CLOSE = false
constexpr

◆ DEFAULT_ACTIVE_LOW_FAULT

constexpr bool fcf::devmgr::shutter::DEFAULT_ACTIVE_LOW_FAULT = false
constexpr

◆ DEFAULT_ACTIVE_LOW_OPEN

constexpr bool fcf::devmgr::shutter::DEFAULT_ACTIVE_LOW_OPEN = false
constexpr

◆ DEFAULT_ACTIVE_LOW_SWITCH

constexpr bool fcf::devmgr::shutter::DEFAULT_ACTIVE_LOW_SWITCH = false
constexpr

◆ DEFAULT_IGNORE_CLOSED

constexpr bool fcf::devmgr::shutter::DEFAULT_IGNORE_CLOSED = false
constexpr

◆ DEFAULT_IGNORE_FAULT

constexpr bool fcf::devmgr::shutter::DEFAULT_IGNORE_FAULT = false
constexpr

◆ DEFAULT_IGNORE_OPEN

constexpr bool fcf::devmgr::shutter::DEFAULT_IGNORE_OPEN = false
constexpr

◆ DEFAULT_INITIAL_STATE

constexpr bool fcf::devmgr::shutter::DEFAULT_INITIAL_STATE = false
constexpr

◆ DEFAULT_TIMEOUT

constexpr unsigned int fcf::devmgr::shutter::DEFAULT_TIMEOUT = 10000
constexpr

◆ hw_errors

const std::unordered_map<short, std::string> fcf::devmgr::shutter::hw_errors
Initial value:
= {
{HW_ERR_HW_NOT_OP, "TwinCAT not in OP state or CouplerState not mapped."},
{HW_ERR_INIT_FAILURE, "init failure."},
{HW_ERR_UNEXPECTED_CLOSED, "unexpectedly closed."},
{HW_ERR_UNEXPECTED_NONE, "unexpectedly no open or closed signal active."},
{HW_ERR_UNEXPECTED_OPENED , "unexpectedly opened."},
{HW_ERR_FAULT_SIG, "fault signal active."},
{HW_ERR_BOTH_SIG_ACTIVE, "both open and closed signals active."},
{HW_ERR_TIMEOUT_ENABLE, "enable timed out."},
{HW_ERR_TIMEOUT_DISABLE, "disable timed out."},
{HW_ERR_TIMEOUT_INIT, "init timed out."},
{HW_ERR_TIMEOUT_CLOSE, "close timed out."},
{HW_ERR_TIMEOUT_OPEN, "open timed out."}
}

◆ RPC_CLOSE

constexpr auto fcf::devmgr::shutter::RPC_CLOSE = "rpcClose"
constexpr

◆ rpc_errors

const std::unordered_map<short, std::string> fcf::devmgr::shutter::rpc_errors
Initial value:
= {
{RPC_ERR_NOT_OP, "Cannot disable shutter. Not in OP state"},
{RPC_ERR_NOT_OP_READY, "Cannot enable shutter. Not in READY or FAILURE."},
{RPC_ERR_STILL_OPENNING , "Not allowed to close the shutter while it is still openning"},
{RPC_ERR_STILL_CLOSING, "Not allowed to open the shutter while it is still closing"},
{RPC_ERR_LOCAL, "RPC calls are not allowed in Local mode"},
}

◆ RPC_OPEN

constexpr auto fcf::devmgr::shutter::RPC_OPEN = "rpcOpen"
constexpr

◆ rpcMapping

const std::vector<std::string> fcf::devmgr::shutter::rpcMapping

◆ statMapping

const std::vector<std::string> fcf::devmgr::shutter::statMapping

◆ SUBSTATE_OP_CLOSE

constexpr short fcf::devmgr::shutter::SUBSTATE_OP_CLOSE = 212
constexpr

◆ SUBSTATE_OP_CLOSE_STR

constexpr auto fcf::devmgr::shutter::SUBSTATE_OP_CLOSE_STR = "Close"
constexpr

◆ SUBSTATE_OP_CLOSING

constexpr short fcf::devmgr::shutter::SUBSTATE_OP_CLOSING = 213
constexpr

◆ SUBSTATE_OP_CLOSING_STR

constexpr auto fcf::devmgr::shutter::SUBSTATE_OP_CLOSING_STR = "Closing"
constexpr

◆ SUBSTATE_OP_OPEN

constexpr short fcf::devmgr::shutter::SUBSTATE_OP_OPEN = 214
constexpr

◆ SUBSTATE_OP_OPEN_STR

constexpr auto fcf::devmgr::shutter::SUBSTATE_OP_OPEN_STR = "Open"
constexpr

◆ SUBSTATE_OP_OPENING

constexpr short fcf::devmgr::shutter::SUBSTATE_OP_OPENING = 215
constexpr

◆ SUBSTATE_OP_OPENING_STR

constexpr auto fcf::devmgr::shutter::SUBSTATE_OP_OPENING_STR = "Opening"
constexpr

◆ SUBSTATE_READY_CLOSE

constexpr short fcf::devmgr::shutter::SUBSTATE_READY_CLOSE = 105
constexpr

◆ SUBSTATE_READY_CLOSE_STR

constexpr auto fcf::devmgr::shutter::SUBSTATE_READY_CLOSE_STR = "Ready/Close"
constexpr

◆ SUBSTATE_READY_OPEN

constexpr short fcf::devmgr::shutter::SUBSTATE_READY_OPEN = 106
constexpr

◆ SUBSTATE_READY_OPEN_STR

constexpr auto fcf::devmgr::shutter::SUBSTATE_READY_OPEN_STR = "Ready/Open"
constexpr

◆ SubstateMap

const std::unordered_map<short, std::string> fcf::devmgr::shutter::SubstateMap
fcf::devmgr::shutter::SUBSTATE_OP_CLOSING
constexpr short SUBSTATE_OP_CLOSING
Definition: shutterConfig.hpp:58
fcf::devmgr::shutter::CI_ACTIVE_LOW_OPEN
constexpr auto CI_ACTIVE_LOW_OPEN
Definition: shutterConfig.hpp:31
fcf::devmgr::shutter::SUBSTATE_OP_OPENING_STR
constexpr auto SUBSTATE_OP_OPENING_STR
Definition: shutterConfig.hpp:67
fcf::devmgr::shutter::SUBSTATE_OP_OPENING
constexpr short SUBSTATE_OP_OPENING
Definition: shutterConfig.hpp:60
fcf::devmgr::shutter::SUBSTATE_OP_OPEN_STR
constexpr auto SUBSTATE_OP_OPEN_STR
Definition: shutterConfig.hpp:66
fcf::devmgr::shutter::SUBSTATE_READY_OPEN
constexpr short SUBSTATE_READY_OPEN
Definition: shutterConfig.hpp:56
fcf::devmgr::common::CI_STAT_ERROR_CODE
constexpr auto CI_STAT_ERROR_CODE
Definition: deviceConfig.hpp:54
fcf::devmgr::shutter::RPC_ERR_NOT_OP_READY
@ RPC_ERR_NOT_OP_READY
Definition: shutterRpcErrors.hpp:21
fcf::devmgr::shutter::RPC_ERR_STILL_OPENNING
@ RPC_ERR_STILL_OPENNING
Definition: shutterRpcErrors.hpp:23
fcf::devmgr::shutter::RPC_ERR_LOCAL
@ RPC_ERR_LOCAL
Definition: shutterRpcErrors.hpp:25
fcf::devmgr::common::SUBSTATE_OP_DISABLING_STR
constexpr auto SUBSTATE_OP_DISABLING_STR
Definition: deviceConfig.hpp:95
fcf::devmgr::shutter::HW_ERR_TIMEOUT_INIT
@ HW_ERR_TIMEOUT_INIT
Definition: shutterHwErrors.hpp:28
fcf::devmgr::shutter::SUBSTATE_OP_OPEN
constexpr short SUBSTATE_OP_OPEN
Definition: shutterConfig.hpp:59
fcf::devmgr::common::CI_STAT_STATE
constexpr auto CI_STAT_STATE
Definition: deviceConfig.hpp:51
fcf::devmgr::common::CI_STAT_LOCAL
constexpr auto CI_STAT_LOCAL
Definition: deviceConfig.hpp:53
fcf::devmgr::shutter::SUBSTATE_OP_CLOSING_STR
constexpr auto SUBSTATE_OP_CLOSING_STR
Definition: shutterConfig.hpp:65
fcf::devmgr::shutter::RPC_ERR_STILL_CLOSING
@ RPC_ERR_STILL_CLOSING
Definition: shutterRpcErrors.hpp:24
fcf::devmgr::shutter::RPC_CLOSE
constexpr auto RPC_CLOSE
Definition: shutterConfig.hpp:51
fcf::devmgr::shutter::HW_ERR_TIMEOUT_OPEN
@ HW_ERR_TIMEOUT_OPEN
Definition: shutterHwErrors.hpp:30
fcf::devmgr::shutter::SUBSTATE_READY_CLOSE
constexpr short SUBSTATE_READY_CLOSE
Definition: shutterConfig.hpp:55
fcf::devmgr::common::RPC_STOP
constexpr auto RPC_STOP
Definition: deviceConfig.hpp:46
fcf::devmgr::shutter::HW_ERR_TIMEOUT_DISABLE
@ HW_ERR_TIMEOUT_DISABLE
Definition: shutterHwErrors.hpp:27
fcf::devmgr::shutter::HW_ERR_BOTH_SIG_ACTIVE
@ HW_ERR_BOTH_SIG_ACTIVE
Definition: shutterHwErrors.hpp:25
fcf::devmgr::common::RPC_DISABLE
constexpr auto RPC_DISABLE
Definition: deviceConfig.hpp:45
fcf::devmgr::shutter::HW_ERR_UNEXPECTED_CLOSED
@ HW_ERR_UNEXPECTED_CLOSED
Definition: shutterHwErrors.hpp:21
fcf::devmgr::common::SUBSTATE_OP_DISABLING
constexpr int SUBSTATE_OP_DISABLING
Definition: deviceConfig.hpp:92
fcf::devmgr::common::SUBSTATE_NOTREADY_STR
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:87
fcf::devmgr::common::SUBSTATE_INITIALISING_STR
constexpr auto SUBSTATE_INITIALISING_STR
Definition: deviceConfig.hpp:88
fcf::devmgr::common::SUBSTATE_NOTREADY
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:82
fcf::devmgr::shutter::SUBSTATE_READY_CLOSE_STR
constexpr auto SUBSTATE_READY_CLOSE_STR
Definition: shutterConfig.hpp:62
fcf::devmgr::shutter::HW_ERR_HW_NOT_OP
@ HW_ERR_HW_NOT_OP
Definition: shutterHwErrors.hpp:19
fcf::devmgr::shutter::HW_ERR_TIMEOUT_ENABLE
@ HW_ERR_TIMEOUT_ENABLE
Definition: shutterHwErrors.hpp:26
fcf::devmgr::shutter::CI_ACTIVE_LOW_FAULT
constexpr auto CI_ACTIVE_LOW_FAULT
Definition: shutterConfig.hpp:30
fcf::devmgr::shutter::HW_ERR_FAULT_SIG
@ HW_ERR_FAULT_SIG
Definition: shutterHwErrors.hpp:24
fcf::devmgr::common::SUBSTATE_INITIALISING
constexpr int SUBSTATE_INITIALISING
Definition: deviceConfig.hpp:84
fcf::devmgr::shutter::HW_ERR_INIT_FAILURE
@ HW_ERR_INIT_FAILURE
Definition: shutterHwErrors.hpp:20
fcf::devmgr::shutter::RPC_ERR_NOT_OP
@ RPC_ERR_NOT_OP
Definition: shutterRpcErrors.hpp:20
fcf::devmgr::common::RPC_ENABLE
constexpr auto RPC_ENABLE
Definition: deviceConfig.hpp:44
fcf::devmgr::common::SUBSTATE_OP_ERROR
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:93
fcf::devmgr::shutter::HW_ERR_TIMEOUT_CLOSE
@ HW_ERR_TIMEOUT_CLOSE
Definition: shutterHwErrors.hpp:29
fcf::devmgr::shutter::SUBSTATE_READY_OPEN_STR
constexpr auto SUBSTATE_READY_OPEN_STR
Definition: shutterConfig.hpp:63
fcf::devmgr::common::SUBSTATE_OP_ERROR_STR
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:96
fcf::devmgr::common::CI_STAT_SUBSTATE
constexpr auto CI_STAT_SUBSTATE
Definition: deviceConfig.hpp:50
fcf::devmgr::common::SUBSTATE_ERROR
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:85
fcf::devmgr::shutter::HW_ERR_UNEXPECTED_OPENED
@ HW_ERR_UNEXPECTED_OPENED
Definition: shutterHwErrors.hpp:23
fcf::devmgr::common::RPC_INIT
constexpr auto RPC_INIT
Definition: deviceConfig.hpp:43
fcf::devmgr::shutter::SUBSTATE_OP_CLOSE_STR
constexpr auto SUBSTATE_OP_CLOSE_STR
Definition: shutterConfig.hpp:64
fcf::devmgr::common::SUBSTATE_ERROR_STR
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:90
fcf::devmgr::shutter::SUBSTATE_OP_CLOSE
constexpr short SUBSTATE_OP_CLOSE
Definition: shutterConfig.hpp:57
fcf::devmgr::shutter::RPC_OPEN
constexpr auto RPC_OPEN
Definition: shutterConfig.hpp:50
fcf::devmgr::shutter::HW_ERR_UNEXPECTED_NONE
@ HW_ERR_UNEXPECTED_NONE
Definition: shutterHwErrors.hpp:22
fcf::devmgr::common::RPC_RESET
constexpr auto RPC_RESET
Definition: deviceConfig.hpp:47