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
nameA unique name for the ECC server ip_addressThe IP address of the ECC server portThe TCP port that the ECC server listens on. is_onlineWhether the ECC server process is currently available and responding to requests is_transitioningWhether the ECC server is currently changing state log_pathThe path to the ECC server process’s log file on the computer where the process is running. selected_configThe configuration file set this ECC server will use stateThe state of the ECC server with respect to the CoBo state machine. State constants and attributes
DESCRIBEDA constant representing the “described” state IDLEA constant representing the “idle” state PREPAREDA constant representing the “prepared” state READYA constant representing the “ready” state RUNNINGA constant representing the “running” state RESETA constant that is used to tell the system to step backwards by one state STATE_DICTA 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.