17 "implementation_id",
"Joystick",
18 "type_name",
"Joystick",
19 "description",
"Access a joystick control device.",
20 "version", HRPSYS_PACKAGE_VERSION,
22 "category",
"Human input",
23 "activity_type",
"PERIODIC",
24 "kind",
"DataFlowComponent",
27 "lang_type",
"compile",
29 "conf.default.device",
"/dev/input/js1",
30 "conf.default.debugLevel",
"0",
42 m_axesOut(
"Axes", m_axes),
43 m_buttonsOut(
"Buttons", m_buttons),
109 std::cout <<
"Joystick::onActivated(" << ec_id <<
")" << std::endl;
122 std::cerr <<
"Joystick device(" <<
m_device <<
") is not opened" << std::endl;
123 return RTC::RTC_ERROR;
130 std::cout <<
"Joystick::onDeactivated(" << ec_id <<
")" << std::endl;
203 RTC::Create<Joystick>,
204 RTC::Delete<Joystick>);
png_infop png_charpp int png_charpp profile
void JoystickInit(RTC::Manager *manager)
OutPort< TimedFloatSeq > m_axesOut
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
TimedBooleanSeq m_buttons
Access a joystick control device.
virtual RTC::ReturnCode_t onInitialize()
bool addOutPort(const char *name, OutPortBase &outport)
bool getButtonState(int i_index) const
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
ExecutionContextHandle_t UniqueId
bool bindParameter(const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
OutPort< TimedBooleanSeq > m_buttonsOut
unsigned int m_debugLevel
Joystick(RTC::Manager *manager)
constructor
unsigned int nAxes() const
static const char * joystick_spec[]
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
virtual bool write(DataType &value)
virtual ~Joystick()
destructor
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
float getAxisState(int i_index) const
unsigned int nButtons() const