Download data/cisstParameterTypes/prmOperatingState.cdg from introvoyz045/cisst: direct link, hf CLI and curl.
- Browser
- Download file 2.51 kB
-
https://huggingface.co/datasets/introvoyz045/cisst/resolve/main/data/cisstParameterTypes/prmOperatingState.cdg
- Command line
-
hf download hf://datasets/introvoyz045/cisst/data/cisstParameterTypes/prmOperatingState.cdg
-
curl -L -o prmOperatingState.cdg https://huggingface.co/datasets/introvoyz045/cisst/resolve/main/data/cisstParameterTypes/prmOperatingState.cdg
2.51 kB
| // -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- | |
| // ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: | |
| inline-header { | |
| #include <cisstMultiTask/mtsGenericObject.h> | |
| // Always include last | |
| #include <cisstParameterTypes/prmExport.h> | |
| } | |
| class { | |
| name prmOperatingState; | |
| attribute CISST_EXPORT; | |
| base-class { | |
| type mtsGenericObject; | |
| is-data true; | |
| } | |
| enum { | |
| name StateType; | |
| enum-value { | |
| name UNDEFINED; | |
| description undefined; | |
| } | |
| enum-value { | |
| name DISABLED; | |
| description disabled; | |
| } | |
| enum-value { | |
| name ENABLED; | |
| description enabled; | |
| } | |
| enum-value { | |
| name PAUSED; | |
| description paused; | |
| } | |
| enum-value { | |
| name FAULT; | |
| description fault; | |
| } | |
| } | |
| enum { | |
| name CommandType; | |
| enum-value { | |
| name enable; | |
| } | |
| enum-value { | |
| name disable; | |
| } | |
| enum-value { | |
| name pause; | |
| } | |
| enum-value { | |
| name resume; | |
| } | |
| enum-value { | |
| name home; | |
| } | |
| enum-value { | |
| name unhome; | |
| } | |
| } | |
| member { | |
| name State; | |
| type prmOperatingState::StateType; | |
| default prmOperatingState::UNDEFINED; | |
| description Operating state, standard states include DISABLED, ENABLED, PAUSED and FAULT; | |
| } | |
| member { | |
| name SubState; | |
| type std::string; | |
| description Sub state, application dependent; | |
| } | |
| member { | |
| name IsHomed; | |
| type bool; | |
| } | |
| member { | |
| name IsBusy; | |
| type bool; | |
| } | |
| inline-header { | |
| private: | |
| CMN_DECLARE_SERVICES(CMN_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEFAULT); | |
| public: | |
| inline bool IsEnabledHomedAndNotBusy(void) const { | |
| return ((State() == prmOperatingState::ENABLED) | |
| && IsHomed() && !IsBusy()); | |
| } | |
| inline bool IsEnabledAndHomed(void) const { | |
| return ((State() == prmOperatingState::ENABLED) | |
| && IsHomed()); | |
| } | |
| virtual bool ValidCommand(const CommandType & command, | |
| StateType & newOperatingState, | |
| std::string & humanReadableMessage); | |
| } | |
| } | |
| inline-header { | |
| CMN_DECLARE_SERVICES_INSTANTIATION(prmOperatingState); | |
| } | |