Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pyipmi/__pycache__/bmc.cpython-39.pyc
Ðазад
a ]�h: � @ st d dl mZ d dlmZ d dlmZ d dlmZ G dd� de�Z G dd� de�Z G d d � d e�ZG dd� de�Zd S )� )�create_request_by_name)�check_completion_code)�State)�VersionFieldc @ s^ e Zd Zdd� Zdd� Zdd� Zdd� Zdd d�Zdd � Zdd� Z dd� Z dd� Zdd� Zd S )�Bmcc C s t | �d��S )NZGetDeviceId)�DeviceId�send_message_with_name��self� r �z/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pyipmi/bmc.py� get_device_id s zBmc.get_device_idc C s t | �d��S )NZ GetDeviceGuid)� DeviceGuidr r r r r �get_device_guid s zBmc.get_device_guidc C s | � d� d S )NZ ColdReset�r r r r r � cold_reset s zBmc.cold_resetc C s | � d� d S )NZ WarmResetr r r r r � warm_reset! s zBmc.warm_resetNc C sR t d�}||j_||j_||j_||j_||_|r8||_| �|�}t |j � |jS )NZMasterWriteRead)r �bus_id�type�id�channelZ slave_addressZ read_count�data�send_messager �completion_code) r �bus_typer r �address�countr �req�rspr r r �i2c_write_read$ s zBmc.i2c_write_readc C s | � ||||d|� d S )N� �r )r r r r r r r r r � i2c_write2 s z Bmc.i2c_writec C s | � |||||d �S �Nr! )r r r r r r r r r �i2c_read5 s �zBmc.i2c_readc C sz t d�}|j|j_|jrdpd|j_|jr.dp0d|j_|j|j_|j|j_|j|_|j|_|j |_ | � |�}t|j� d S )NZSetWatchdogTimerr r ) r � timer_use� dont_stop�dont_log�pre_timeout_interrupt� timer_actions�timeout_action�pre_timeout_interval�timer_use_expiration_flags�initial_countdownr r r )r �configr r r r r �set_watchdog_timer9 s zBmc.set_watchdog_timerc C s t | �d��S )NZGetWatchdogTimer)�Watchdogr r r r r �get_watchdog_timerH s zBmc.get_watchdog_timerc C s | � d� d S )NZResetWatchdogTimerr r r r r �reset_watchdog_timerK s zBmc.reset_watchdog_timer)N) �__name__� __module__�__qualname__r r r r r r"