????
Current Path : /lib64/python3.6/site-packages/pcp/__pycache__/ |
Current File : //lib64/python3.6/site-packages/pcp/__pycache__/pmgui.cpython-36.pyc |
3 4>�f7 � @ s� d Z ddlmZ ddlmZ ddlmZmZmZm Z m Z ddlmZmZm Z mZ ddlmZ eed��Zeed��ZG d d � d e�Zeej_eee gej_e ej_ee eee��gej_e ej_ee�e egej_G dd� de�Zd S )zF Wrapper module for libpcp_gui - PCP Graphical User Interface clients � )�pmErr)� PM_ERR_IPC)�CDLL� Structure�POINTER�cast�byref)�c_void_p�c_char_p�c_int�c_long)�find_libraryZpcp_gui�cc @ s2 e Zd ZdZdefdefdefdefdefgZdS )�pmRecordHostzAstate information between the recording session and the pmlogger �f_configZfd_ipcZlogfile�pid�statusN)�__name__� __module__�__qualname__�__doc__r r r Z_fields_� r r �/usr/lib64/python3.6/pmgui.pyr 2 s r c @ s4 e Zd ZdZedd� �Zedd� �Zedd� �ZdS ) � GuiClientz; Provides metric recording and time control interfaces c C sR t | t�s| jd�} t |t�s(|jd�}tjt| �t|�|�}|dkrNt|��|S )zp GUI API - Setup an archive recording session File* file = pmRecordSetup("folio", "creator", 0) zutf-8r )� isinstance�bytes�encode� LIBPCP_GUI� pmRecordSetupr r )ZfolioZcreatorZreplayZfile_resultr r r r \ s zGuiClient.pmRecordSetupc C s� t | t�s| jd�} tt�� }tjt| �|t|��}|dk rDt |��t |t�sX|jd�}t jt|�t|j j��}|dk r�t jtd�� t |��||fS )z� GUI API - Adds host to an archive recording session (status, recordhost) = pmRecordAddHost("host", 1, "configuration") zutf-8r � )r r r r r r �pmRecordAddHostr r r �LIBCZfputsr �contentsr �perror)�hostZ isdefault�config�rhpr r r r r k s zGuiClient.pmRecordAddHostc C sL t |t�s|jd�}tjt| tt��|t|��}|dk rH|t krHt |��|S )z�PMAPI - Control an archive recording session status = pmRecordControl(0, cpmgui.PM_RCSETARG, "args") status = pmRecordControl(0, cpmgui.PM_REC_ON) status = pmRecordControl(0, cpmgui.PM_REC_OFF) zutf-8r )r r r r �pmRecordControlr r r r r r )r&