When creating a string record, if you set an initial_value that is longer than 39 characters the data is silently truncated. It would be useful if there was at least a warning/error of some kind emitted when this occurs.
In this example note that the trailing "!" of the string is missing:
# Import the basic framework components.
from softioc import softioc, builder, asyncio_dispatcher
# Create an asyncio dispatcher, the event loop is now running
dispatcher = asyncio_dispatcher.AsyncioDispatcher()
# Set the record prefix
builder.SetDeviceName("PREFIX")
# Create some records
bo1 = builder.stringOut('SO', initial_value="hello this is long sentence of 39 chars!")
# Boilerplate get the IOC started
builder.LoadDatabase()
softioc.iocInit(dispatcher)
# Finally leave the IOC running with an interactive shell.
softioc.interactive_ioc(globals())
Getting the value:
[...]$ caget PREFIX:SO
PREFIX:SO hello this is long sentence of 39 chars
When creating a string record, if you set an
initial_valuethat is longer than 39 characters the data is silently truncated. It would be useful if there was at least a warning/error of some kind emitted when this occurs.In this example note that the trailing "!" of the string is missing:
Getting the value: