summaryrefslogtreecommitdiffstats
path: root/tools/example/net/poettering/Calculator.interface.yaml
blob: 3c70cbc3b9d94c811c59281e6103ca774cb4cb2e (plain)
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
description: >
    An example interface originally described as part of the announcment
    of new sd-bus interfaces at:
        http://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html
methods:
    - name: Multiply
      description: >
        Multiplies two integers 'x' and 'y' and returns the result.
      parameters:
        - name: x
          type: int64
          description: >
            The first integer to multiply.
        - name: y
          type: int64
          description: >
            The second integer to multiply.
          default: 1
      returns:
        - name: z
          type: int64
          description: >
            The result of (x*y).
    - name: Divide
      description: >
        Divides two integers 'x' and 'y' and returns the result.
      parameters:
        - name: x
          type: int64
          description: >
            The first integer to divide.
        - name: y
          type: int64
          description: >
            The second integer to divide.
          default: 1
      returns:
        - name: z
          type: int64
          description: >
            The result of (x/y).
      errors:
        - self.Error.DivisionByZero
    - name: Clear
      description: >
        Reset the LastResult property to zero.
properties:
    - name: LastResult
      type: int64
      default: 0
      description: >
        The result of the most recent calculation.
signals:
    - name: Cleared
      description: >
        Signal indicating the LastReset property has been set to zero by the
        'Clear' method.
      properties:
        - type: int64
          description: >
            Value of LastReset prior to Clear.

OpenPOWER on IntegriCloud