Enumerated

class Cauldron.DFW.Keyword.Enumerated

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

An enumerated keyword, which uses an integer as the underlying datatype.

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

Attributes Summary

KTL_ALIASES
KTL_DISPATCHER
KTL_REGISTERED
KTL_TYPE
full_name Full name.
keys The keys available.
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 the enumerated integer to the binary representation.
check(value) Check the value
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)
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) Translate to the enumerated binary value
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 = 'enumerated'
full_name

Full name. Includes Keyword and Service name.

keys

The keys available.

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 the enumerated integer to the binary representation.

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

Check the value

increment(amount=1) [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) [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)[source] [edit on github]
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]

Translate to the enumerated binary value

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.