In builder.py's _in_record function we see this code:
if 'initial_value' in fields:
fields.setdefault('PINI', 'YES')
There is no equivalent code for when .set() is called. This means that In records do not process on startup correctly such that caget sees the value. For example run the following IOC in a terminal:
# Import the basic framework components.
from softioc import softioc, builder, asyncio_dispatcher
import numpy
# Create an asyncio dispatcher, the event loop is now running
dispatcher = asyncio_dispatcher.AsyncioDispatcher()
# Set the record prefix
builder.SetDeviceName("PREFIX")
# Create some records
li = builder.longIn("TEST")
li.set(10)
# Boilerplate get the IOC started
builder.LoadDatabase()
softioc.iocInit(dispatcher)
# Finally leave the IOC running with an interactive shell.
softioc.interactive_ioc(globals())
In
builder.py
's_in_record
function we see this code:There is no equivalent code for when
.set()
is called. This means that In records do not process on startup correctly such thatcaget
sees the value. For example run the following IOC in a terminal:And from another do
caget
:And we see that the
.set()
has not taken effect.