# Do NOT edit this file!
# It was generated by IdlC class idl.json.python.ProxyAsnVisitor.

#
# Section generated from "/home/nb/builds/MEGA/px2-3.0.0-3.0.9-branch-20140613-none-release-none-pdu-raritan/fwcomponents/mkdist/tmp/px2_final/libisys/src/idl/System.idl"
#

import raritan.rpc
from raritan.rpc import (
    Interface,
    Structure,
    ValueObject,
    Enumeration,
    typecheck,
    DecodeException,
)

# interface
class System(Interface):
    idlType = "sys.System:1.0.0"

    def isDaemonRunning(self, name):
        agent = self.agent
        typecheck.is_string(name, AssertionError)
        args = {}
        args["name"] = name
        rsp = agent.json_rpc(self.target, "isDaemonRunning", args)
        _ret_ = rsp["_ret_"]
        typecheck.is_bool(_ret_, DecodeException)
        return _ret_

    def restartDaemon(self, name):
        agent = self.agent
        typecheck.is_string(name, AssertionError)
        args = {}
        args["name"] = name
        rsp = agent.json_rpc(self.target, "restartDaemon", args)
