technik

LUA: Callback text_file_put changes file content

Discussion created by technik on Aug 10, 2011
Latest reply on Jan 31, 2012 by RobPol

Hi,

 

I use text_file_put for transferring a configuration file to a robot. But after the file is written to the destination robot the content is not the same as the source file. 

Every CR LF in the source file is converted to CR CR LF. Is this a bug in the callback function or do I something wrong?

 

-- d_robot = destination robot address
-- d_probe_info = pdsTable of callback result probe_list on d_robot

p_args=pds.create()
pds.putString(p_args,"directory",d_probe_info.workdir) -- contains workdir of probe
pds.putString(p_args,"file",d_probe_info.config) -- contains cfg filename
pds.putString(p_args,"file_contents",file.read("cdm.cfg"))
ret=nimbus.request(d_robot.."/controller","text_file_put",p_args)
pds.delete(p_args)

 

Regards,

 

Olaf

Outcomes