HAL Component — SIM_PARPORTV2
INSTANTIABLE COMPONENTS — General
All instantiable components can be loaded in two manners
Using loadrt with or without count= | names= parameters as per legacy components
Using newinst, which names the instance and allows further parameters and arguments
primarily pincount= which can set the number of pins created for that instance (where applicable)
sim_parportv2 — A component to simulate the pins of the hal_parport component
newinst sim_parportv2 <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]
( args in [ ] denote possible args and parameters, may not be used in all components )
Sim_parport is used to replace the pins of a real parport without changing any of the pins names in the rest of the config. .br It has pass-through pins (ending in -fake) that allows connecting to other components.
eg pin-02-in will follow pin-02-in-fake 's logic. .br pin_01_out-fake will follow pin_01_out (possibly modified by pin_01_out-invert)
It creates all possible pins of both 'in' and 'out' options of the hal_parport component. .br This allows using other hardware I/O in place of the parport (without having to change the rest of the config) .br or simulating hardware such as limit switches. .br it’s primary use is in Stepconf for building simulated configs. .br You must use the names= option to have the right pin names. .br eg. names=parport.0,parport.1 .br The read and write functions pass the logic from pins to fake pins or vice vera .br The reset function is a no operation.
sim_parportv2.N.read.funct ( OR <newinstname>.read.funct )
sim_parportv2.N.write.funct ( OR <newinstname>.write.funct )
sim_parportv2.N.reset.funct ( OR <newinstname>.reset.funct )