grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a úº†j7ã@sædZddlmZddlmZddlmZmZmZm Z m Z ddlm Z m 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_Gd d „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 r r Z_fields_©rrú//usr/lib64/python3.9/site-packages/pcp/pmgui.pyr2sürc@s4eZdZdZedd„ƒZedd„ƒZedd„ƒZdS) Ú GuiClientz; Provides metric recording and time control interfaces cCsRt|tƒs| d¡}t|tƒs(| d¡}t t|ƒt|ƒ|¡}|dkrNt|ƒ‚|S)zp GUI API - Setup an archive recording session File* file = pmRecordSetup("folio", "creator", 0) úutf-8r)Ú isinstanceÚbytesÚencodeÚ LIBPCP_GUIÚ pmRecordSetupr r)ZfolioZcreatorZreplayZ file_resultrrrr\s     ÿzGuiClient.pmRecordSetupcCs–t|tƒs| d¡}ttƒƒ}t t|ƒ|t|ƒ¡}|dkrDt |ƒ‚t|tƒsX| d¡}t   t|ƒt |j jƒ¡}|dkrŽt  tdƒ¡t |ƒ‚||fS)zˆ GUI API - Adds host to an archive recording session (status, recordhost) = pmRecordAddHost("host", 1, "configuration") rrÚ)rrrrrrÚpmRecordAddHostr rrÚLIBCZfputsr ÚcontentsrÚperror)ÚhostZ isdefaultZconfigÚrhprrrrr!ks    ÿ  zGuiClient.pmRecordAddHostcCsLt|tƒs| d¡}t t|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) rr) rrrrÚpmRecordControlrrrr rr)r&ZrequestÚoptionsrrrrr's  ÿzGuiClient.pmRecordControlN)rrrrÚ staticmethodrr!r'rrrrrUs  rN)rZ pcp.pmapirZcpmapirZctypesrrrrrr r r r Z ctypes.utilr rr"rrZrestypeÚargtypesr!r'ÚobjectrrrrrÚs      ÿ