dls-controls / ethercat

EPICS support to read/write to ethercat based hardware
23 stars 12 forks source link

string needs to be unpacked #3

Open ronaldomercado opened 8 years ago

ronaldomercado commented 8 years ago

https://github.com/dls-controls/ethercat/blob/master/ethercatApp/src/ecAsyn.cpp

The method receive_config_on_connect has debugging messages that attempt to print the configuration received from the scanner. printf is called on the config_buffer "raw". However the scanner sends the configuration packed and the message includes the length of the following string. So the output is garbled. Example output from ioc running version 4-3

[Fri Nov 13 18:47:58 2015]getting config
[Fri Nov 13 18:47:58 2015]config-file size:111970 [Fri Nov 13 18:47:58 2015]^D
[Fri Nov 13 18:47:58 2015]****