????

Your IP : 3.23.61.5


Current Path : /lib64/python3.6/site-packages/pcp/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/pcp/__pycache__/pmgui.cpython-36.opt-1.pyc

3

4>�f7�@s�dZddlmZddlmZddlmZmZmZm	Z	m
Z
ddlmZmZm
Z
mZddlmZeed��Zeed��ZGd	d
�d
e�Zeej_eee
gej_e
ej_ee
eee��gej_e
ej_ee�e
egej_Gdd�de�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@s2eZdZdZdefdefdefdefdefgZdS)�pmRecordHostzAstate information between the recording session and the pmlogger �f_configZfd_ipcZlogfile�pid�statusN)�__name__�
__module__�__qualname__�__doc__r	rr
Z_fields_�rr�/usr/lib64/python3.6/pmgui.pyr2src@s4eZdZdZedd��Zedd��Zedd��ZdS)	�	GuiClientz; Provides metric recording and time control interfaces
    cCsRt|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_resultrrrr\s




zGuiClient.pmRecordSetupcCs�t|t�s|jd�}tt��}tjt|�|t|��}|dkrDt	|��t|t�sX|jd�}t
jt|�t|j
j��}|dkr�t
jtd��t	|��||fS)z� GUI API - Adds host to an archive recording session
        (status, recordhost) = pmRecordAddHost("host", 1, "configuration")
        zutf-8r�)rrrrrr�pmRecordAddHostr
rr�LIBCZfputsr�contentsr�perror)�hostZ	isdefault�config�rhprrrrr ks





zGuiClient.pmRecordAddHostcCsLt|t�s|jd�}tjt|tt��|t|��}|dkrH|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)rrrr�pmRecordControlrrrr
rr)r&ZrequestZoptionsrrrrr's

zGuiClient.pmRecordControlN)rrrr�staticmethodrr r'rrrrrUsrN)rZ	pcp.pmapirZcpmapirZctypesrrrrrr	r
rrZctypes.utilr
rr!rrZrestypeZargtypesr r'�objectrrrrr�<module>s