File: __init__.py

package info (click to toggle)
raritan-json-rpc-sdk 4.0.20%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 57,236 kB
  • sloc: cs: 223,121; perl: 117,786; python: 26,872; javascript: 6,544; makefile: 27
file content (132 lines) | stat: -rw-r--r-- 3,481 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2022 Raritan Inc. All rights reserved.
#
# This is an auto-generated file.

#
# Section generated by IdlC from "ScannerCtrl.idl"
#

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

# interface
class ScannerCtrl(Interface):
    idlType = "tfw.ScannerCtrl:1.0.0"

    class _getScanInterval(Interface.Method):
        name = 'getScanInterval'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = rsp['_ret_']
            typecheck.is_int(_ret_, DecodeException)
            return _ret_

    class _setScanInterval(Interface.Method):
        name = 'setScanInterval'

        @staticmethod
        def encode(interval):
            typecheck.is_int(interval, AssertionError)
            args = {}
            args['interval'] = interval
            return args

        @staticmethod
        def decode(rsp, agent):
            return None
    def __init__(self, target, agent):
        super(ScannerCtrl, self).__init__(target, agent)
        self.getScanInterval = ScannerCtrl._getScanInterval(self)
        self.setScanInterval = ScannerCtrl._setScanInterval(self)

#
# Section generated by IdlC from "CoreCtrl.idl"
#

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


# interface
class CoreCtrl(Interface):
    idlType = "tfw.CoreCtrl:1.0.0"

    class _getScanner(Interface.Method):
        name = 'getScanner'

        @staticmethod
        def encode(name):
            typecheck.is_string(name, AssertionError)
            args = {}
            args['name'] = name
            return args

        @staticmethod
        def decode(rsp, agent):
            _ret_ = Interface.decode(rsp['_ret_'], agent)
            typecheck.is_interface(_ret_, raritan.rpc.tfw.ScannerCtrl, DecodeException)
            return _ret_

    class _startAllScanners(Interface.Method):
        name = 'startAllScanners'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            return None

    class _stopAllScanners(Interface.Method):
        name = 'stopAllScanners'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            return None

    class _startAllBackWorkers(Interface.Method):
        name = 'startAllBackWorkers'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            return None

    class _stopAllBackWorkers(Interface.Method):
        name = 'stopAllBackWorkers'

        @staticmethod
        def encode():
            args = {}
            return args

        @staticmethod
        def decode(rsp, agent):
            return None
    def __init__(self, target, agent):
        super(CoreCtrl, self).__init__(target, agent)
        self.getScanner = CoreCtrl._getScanner(self)
        self.startAllScanners = CoreCtrl._startAllScanners(self)
        self.stopAllScanners = CoreCtrl._stopAllScanners(self)
        self.startAllBackWorkers = CoreCtrl._startAllBackWorkers(self)
        self.stopAllBackWorkers = CoreCtrl._stopAllBackWorkers(self)