On Wed, 12 Jun 2024 at 21:41, Nicklas SB Karlsson <n...@nksb.eu> wrote:
> Any parser in Linuxcnc which may be reused to read this configuration file possible with other syntax? An option (possibly not a good option) might be to borrow the bits of the smart-serial driver that create HAL pins. (This code is already re-used by the absolute encoder driver) https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/drivers/mesa-hostmot2/sserial.c#L1167 Here is where it is used by the absolute encoder parser: https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/drivers/mesa-hostmot2/abs_encoder.c#L235 I suspect that forcing this to fit might be too limiting, though. I took a completely different route with mesa_modbus, having realised that the configuration hardly ever changes, I went for an approach that parses the data into a compiled module. https://linuxcnc.org/docs/stable/html/drivers/mesa_modbus.html This was at least partly because realtime modules don't generally have access to the file system whilst loading. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers