ReadonlysizeCoils the cache currently holds a state for. Intended for tests.
Splits proposed writes into the ones that change a coil and the ones that do not. When an address appears more than once, the last write wins.
How many times what this cache believes about a unit has been discarded. Read it before a write, and give it to observe.
Forgets what a unit holds, or what every unit holds when unitId is omitted.
OptionalunitId: numberRecords that a coil now holds a state.
Call this only after the device acknowledged the write. When generation
is given and the unit was invalidated after it, the call records nothing.
Optionalgeneration: numberThe state this process last wrote to a coil, or undefined when unknown.
A batching client uses this to fill the gaps of an FC15 span without a read.
A belief about the coil states on a bus.
This is the coil form of
RegisterCache. It stores one boolean for each unit and coil address. Coils and holding registers are separate address spaces, so they use separate caches.The cache records only what this process wrote. It does not read the device.