attpcdaq.daq.models.ECCServer¶
-
class
attpcdaq.daq.models.
ECCServer
(*args, **kwargs)[source]¶ Represents an individual ECC server which may control one or more data sources.
This object is responsible for the bulk of the program’s work. It is capable of communicating with the ECC server process to change the state of a CoBo or MuTAnT, and it also maintains a record of the ECC server’s current state.
Data sources are associated with an ECC server through a many-to-one relationship, meaning that one ECC server may control many data sources. Alternatively, each data source may have its own ECC server, if that is desired.
Fields
name
A unique name for the ECC server ip_address
The IP address of the ECC server port
The TCP port that the ECC server listens on. is_online
Whether the ECC server process is currently available and responding to requests is_transitioning
Whether the ECC server is currently changing state log_path
The path to the ECC server process’s log file on the computer where the process is running. selected_config
The configuration file set this ECC server will use state
The state of the ECC server with respect to the CoBo state machine. State constants and attributes
DESCRIBED
A constant representing the “described” state IDLE
A constant representing the “idle” state PREPARED
A constant representing the “prepared” state READY
A constant representing the “ready” state RUNNING
A constant representing the “running” state RESET
A constant that is used to tell the system to step backwards by one state STATE_DICT
A dictionary mapping state constants back to state names Methods
change_state
(target_state)Tells the ECC server to transition the data source to a new state. get_data_link_xml_from_clients
()Get an XML representation of the data link for this source. refresh_configs
()Fetches the list of configs from the ECC server and updates the database. refresh_state
()Gets the current state of the data source from the ECC server and updates the database. _get_soap_client
()Creates a SOAP client for communicating with the ECC server. _get_transition
(client, current_state, ...)Look up the appropriate SOAP request to change the ECC server from one state to another.