I have 5000 data item definition configuration which we are expecting to be designed like,
-- Name of the device
VARIABLE Name {
type=Float,
length=20,
<<few more definition here>>
}
-- The device running elapsed time since its last boot
VARIABLE BootTime {
type=Integer,
<<few more definition here>>
}
I will be reading the value of "Name", "BootTime" from a device using diffent communication protocol where we use the above property defined.
I want the VARIABLE to also have properties to pre_processor and post_processor functions.
How to define the structure like this in Lua? If this strcuture is not possible, what is the closet structure possible in Lua
I want to overload operator for this Variable definitions so that I can do,
I can configure BootTime = 23456789 or Do arithmetic like BootTime + 100 (milliseconds) Or comparison like if BootTime > 23456789 then do something