File: BroadcastDownsamplerPython.i

package info (click to toggle)
robotraconteur 1.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,380 kB
  • sloc: cpp: 1,149,268; cs: 87,653; java: 58,127; python: 26,897; ansic: 356; sh: 152; makefile: 90; xml: 51
file content (48 lines) | stat: -rw-r--r-- 1,359 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
%feature("shadow") RobotRaconteur::BroadcastDownsampler::BroadcastDownsampler()
%{
def __init__(self,context,default_downsample = 0):
    """
    Initialize the BroadcastDownsampler

    :param context: The ServerContext of the service
    :type context: ServerContext
    :param default_downsample: The default downsample for clients
    :type default_downsample: int
    """
    #This is a shadowed function
    _RobotRaconteurPython.BroadcastDownsampler_swiginit(self, _RobotRaconteurPython.new_BroadcastDownsampler())
    self._Init(context, default_downsample)
%}

%rename(_Init) RobotRaconteur::BroadcastDownsampler::Init;

%include "BroadcastDownsampler.i"

%extend RobotRaconteur::BroadcastDownsampler
{
%pythoncode %{

def AddPipeBroadcaster(self, broadcaster):
    """
    Add a PipeBroadcaster to the downsampler

    Sets the predicate of the broadcaster to this downsampler

    :param broadcaster: The pipe broadcaster to add
    :type broadcaster: PipeBroadcaster
    """
    self._AddPipeBroadcaster(broadcaster._innerpipe)

def AddWireBroadcaster(self, broadcaster):
    """
    Add a WireBroadcaster to the downsampler

    Sets the predicate of the broadcaster to this downsampler

    :param broadcaster: The pipe broadcaster to add
    :type broadcaster: PipeBroadcaster
    """
    self._AddWireBroadcaster(broadcaster._innerpipe)

%}
}