caproto.ChannelInteger

Inheritance diagram of ChannelInteger
class caproto.ChannelInteger(*, value, units='', upper_disp_limit=0, lower_disp_limit=0, upper_alarm_limit=0, upper_warning_limit=0, lower_warning_limit=0, lower_alarm_limit=0, upper_ctrl_limit=0, lower_ctrl_limit=0, value_atol=0.0, log_atol=0.0, **kwargs)[source]

32-bit LONG integer data and metadata which can be sent over a channel.

May be a single value or an array of values.

Parameters:
valueint or list of int

Default starting value.

timestampfloat, TimeStamp, or 2-tuple, optional

Timestamp to report for the current value. Supported options include time.time()-style UNIX timestamps, raw EPICS timestamps in the form of TimeStamp or (seconds_since_epoch, nanoseconds).

max_lengthint, optional

Maximum array length of the data.

string_encodingstr, optional

Encoding to use for strings, used when serializing and deserializing data.

reported_record_typestr, optional

Though this is not a record, the channel access protocol supports querying the record type. This can be set to mimic an actual record or be set to something arbitrary. Defaults to ‘caproto’.

unitsstr, optional

Engineering units indicator, which can be retrieved over channel access.

upper_disp_limitint, optional

Upper display limit.

lower_disp_limitint, optional

Lower display limit.

upper_alarm_limitint, optional

Upper alarm limit.

upper_warning_limitint, optional

Upper warning limit.

lower_warning_limitint, optional

Lower warning limit.

lower_alarm_limitint, optional

Lower alarm limit.

upper_ctrl_limitint, optional

Upper control limit.

lower_ctrl_limitint, optional

Lower control limit.

value_atolint, optional

Archive tolerance value.

log_atolint, optional

Log tolerance value.

Methods

auth_read(hostname, username, data_type, *)

Get DBR data and native data, converted to a specific type

auth_write(hostname, username, data, ...[, ...])

Data write hook for clients.

calculate_length(value)

Calculate the number of elements given a value

check_access(hostname, username)

This always returns AccessRights.READ|AccessRights.WRITE.

is_compatible_array(value)

Check if the provided value is a compatible array.

post_state_change(state, new_value)

This is called by the server when it exits its StateUpdateContext.

pre_state_change(state, new_value)

This is called by the server when it enters its StateUpdateContext.

preprocess_value(value)

Pre-process values destined for verify_value and write

publish(flags)

Publish data to appropriate queues matching the SubscriptionSpec.

read(data_type)

Read out the ChannelData as data_type.

subscribe(queue, sub_spec, sub)

Subscribe a queue for the given subscription specification.

unsubscribe(queue, sub_spec)

Unsubscribe a queue for the given subscription specification.

update_fields(value)

This is a hook for subclasses to update field instance data.

verify_value(data)

Verify a value prior to it being written by CA or Python

write(value, *[, flags, verify_value, ...])

Write data from native Python types.

write_from_dbr(data, data_type, metadata, *)

Write data from a provided DBR data type.

write_metadata([publish, units, precision, ...])

Write metadata, optionally publishing information to clients.

Attributes

alarm

The ChannelAlarm associated with this data

data_type

default_value

epics_timestamp

EPICS timestamp as (seconds, nanoseconds) since EPICS epoch.

length

The number of elements (length) of the current value

lower_alarm_limit

Read-only access to lower_alarm_limit data

lower_ctrl_limit

Read-only access to lower_ctrl_limit data

lower_disp_limit

Read-only access to lower_disp_limit data

lower_warning_limit

Read-only access to lower_warning_limit data

max_length

The maximum number of elements (length) this channel can hold

severity

Alarm severity

status

Alarm status

timestamp

UNIX timestamp in seconds.

units

Read-only access to units data

upper_alarm_limit

Read-only access to upper_alarm_limit data

upper_ctrl_limit

Read-only access to upper_ctrl_limit data

upper_disp_limit

Read-only access to upper_disp_limit data

upper_warning_limit

Read-only access to upper_warning_limit data

value

Read-only access to value data

max_subscription_backlog