Integer

class Cauldron.DFW.Keyword.Integer

Bases: Cauldron.types.Integer, Cauldron.DFW.Keyword.Keyword, object

An integer value keyword.

A dispatcher-based keyword, which should own its own values.

Attributes Summary

KTL_ALIASES
KTL_DISPATCHER
KTL_REGISTERED
KTL_TYPE
full_name Full name.
maximum
minimum
name Keyword name.
service
value Map .value to ._last_value, the cauldron internal location of this variable.

Methods Summary

callback(function[, remove]) Register a function to be called whenever this keyword is set to a new value.
cast(value) Cast through float
check(value) Check range against allowed KTL values.
increment([amount]) Increment the integer value.
modify(value) Modify this keyword’s value.
period(period) How often a keyword should be updated.
postread(value) Translate the value for python binary return.
postwrite(value) Take some action post-write.
preread() Take some action before this value is read.
prewrite(value) Any actions which need to occur before a value is written.
read() Read the value from the authority source.
schedule([appointment, cancel]) Schedule an update.
set(value[, force]) Set the keyword to the value provided, and broadcast changes.
translate(value) Check value before writing.
update() Update the value by performing a read.
write(value) Write the value to the authority source.

Attributes Documentation

KTL_ALIASES = ()
KTL_DISPATCHER = True
KTL_REGISTERED = True
KTL_TYPE = 'integer'
full_name

Full name. Includes Keyword and Service name.

maximum = 2147483647
minimum = -2147483648
name

Keyword name.

service = None
value

Map .value to ._last_value, the cauldron internal location of this variable.

Methods Documentation

callback(function, remove=False) [edit on github]

Register a function to be called whenever this keyword is set to a new value.

cast(value)[source] [edit on github]

Cast through float

check(value)[source] [edit on github]

Check range against allowed KTL values.

increment(amount=1)[source] [edit on github]

Increment the integer value.

modify(value) [edit on github]

Modify this keyword’s value. This is the public function which should be called to change a keyword value.

period(period) [edit on github]

How often a keyword should be updated.

Note

Cauldron backends are not required to implement this function. If the do not, it will raise an CauldronAPINotImplemented error.

postread(value)[source] [edit on github]

Translate the value for python binary return.

postwrite(value) [edit on github]

Take some action post-write.

This method can be overridden to provide specific behavior in user subclasses.

preread() [edit on github]

Take some action before this value is read. Called at the start of update().

This method can be overridden to provide specific behavior in user subclasses.

prewrite(value) [edit on github]

Any actions which need to occur before a value is written. Called to adjust the value in modify().

This can raise NoWriteNecessary if a write is not necessary.

This method can be overridden to provide specific behavior in user subclasses.

read() [edit on github]

Read the value from the authority source. Called to get the value for update().

This method can be overridden to provide specific behavior in user subclasses.

schedule(appointment=None, cancel=False) [edit on github]

Schedule an update.

Note

Cauldron backends are not required to implement this function. If the do not, it will raise an CauldronAPINotImplemented error.

set(value, force=False) [edit on github]

Set the keyword to the value provided, and broadcast changes.

Parameters:
  • value – The keyword value.
  • force (bool) – Whether to force the change, or ignore repeatedly setting a keyword to the same value.
translate(value)[source] [edit on github]

Check value before writing.

update() [edit on github]

Update the value by performing a read. This is the public function which should be called when the keyword is read.

write(value) [edit on github]

Write the value to the authority source. Called to adjust the value in modify().

This method can be overridden to provide specific behavior in user subclasses.