dongju.jeong Posted March 9, 2020 Share Posted March 9, 2020 (edited) The component packet does not seem to be working properly. ig_config ↓ Setting the component ID to 1 showed the same problem too. and what is parallelupdate ?? Registering a function does not seem to execute the loop. Edited March 9, 2020 by dongju.jeong Link to comment
cash-metall Posted March 10, 2020 Share Posted March 10, 2020 Hello! what is the name of the component in you code? I checked your example - everything seems to work. #include "ComponentSystem/ComponentSystem.h" class K1A1_Cockpit : public ComponentBase { public: COMPONENT(K1A1_Cockpit, ComponentBase); COMPONENT_INIT(init); COMPONENT_UPDATE(update); PROP_NAME("K1A1_Cockpit"); PROP_PARAM(Int, tankclass, -1) PROP_PARAM(Int, position, -1) protected: void init() { getProperty()->addCallback( Property::CALLBACK_PARAMETER_CHANGED, MakeCallback(this, &K1A1_Cockpit::parameter_changed)); } void update() { Log::message("%s %d %d\n", __FUNCTION__, tankclass.get(), position.get()); } void parameter_changed(Unigine::PropertyPtr property, int num) { Log::message("%s %d %d\n", __FUNCTION__, tankclass.get(), position.get()); } }; output K1A1_Cockpit::update -1 -1 K1A1_Cockpit::update -1 -1 K1A1_Cockpit::update -1 -1 K1A1_Cockpit::parameter_changed 1 -1 K1A1_Cockpit::parameter_changed 1 5 K1A1_Cockpit::update 1 5 K1A1_Cockpit::update 1 5 K1A1_Cockpit::update 1 5 K1A1_Cockpit::update 1 5 K1A1_Cockpit::update 1 5 K1A1_Cockpit::update 1 5 K1A1_Cockpit::update 1 5 K1A1_Cockpit::update 1 5 HEMU: entity { name = "K1A1"; type = 4; class = fixedwing; component { name = "ClassPos"; id = 0; } } ig.config.xml <entity_types> <entity id="4" name="K1A1"> <path>ig/entities/aircrafts/be-200/K1A1.node</path> <!-- just rename be200 for test --> <component id="0" name="ClassPos"> <property>K1A1_Cockpit</property> <parameter name="data1">tankclass</parameter> <parameter name="data2">position</parameter> </component> </entity> </entity_types> 1 Link to comment
morbid Posted March 10, 2020 Share Posted March 10, 2020 On 3/9/2020 at 1:12 PM, dongju.jeong said: and what is parallelupdate ?? Registering a function does not seem to execute the loop. This feature is malfunctioning in some cases, and we recommend do not use it. Our team will revamp parallel update it in the future releases. 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
dongju.jeong Posted March 11, 2020 Author Share Posted March 11, 2020 (edited) component name is "K1A1_Cockpit". this message is appeared when same component packet value receive. Edited March 11, 2020 by dongju.jeong Link to comment
cash-metall Posted March 17, 2020 Share Posted March 17, 2020 Quote cant create 0 host packet This is an error only when working with HEMU with component control packet. seems like HEMU bug. СomponentСontrol and ShortComponentControl should work fine. You can verify this by adding callbacks to receive packages. All data comes correctly. 1 Link to comment
Recommended Posts